jupyter %matplotlib inline報錯TypeError:print_svg() got an unexpected keyword argument‘orientation‘問題
問題
學(xué)習(xí)d2l,在jupyter notebook中使用的%matplotlib inline
plot時報錯:
TypeError: print_svg() got an unexpected keyword argument ‘orientation’
換了很多版本也沒有用。
解決
是ipython 跟 matplotlib不兼容,matplotlib官方提供了解決方案:使用ipympl。
- 在python環(huán)境中安裝ipympl:
pip install ipympl - jupyter notebook中替換inline為ipympl:
%matplotlib ipympl
解決
附上ipympl Doc:matplotlib-ipympl

總結(jié)
以上為個人經(jīng)驗(yàn),希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
python 設(shè)置文件編碼格式的實(shí)現(xiàn)方法
下面小編就為大家分享一篇python 設(shè)置文件編碼格式的實(shí)現(xiàn)方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2017-12-12
Django基于ORM操作數(shù)據(jù)庫的方法詳解
這篇文章主要介紹了Django基于ORM操作數(shù)據(jù)庫的方法,結(jié)合實(shí)例形式總結(jié)分析了Django使用ORM操作數(shù)據(jù)庫的相關(guān)配置、增刪改查等相關(guān)操作技巧,需要的朋友可以參考下2018-03-03
利用pandas進(jìn)行數(shù)據(jù)清洗的方法
本文主要介紹了利用pandas進(jìn)行數(shù)據(jù)清洗的方法,文中通過示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下2021-09-09

