开发者

jupyter %matplotlib inline报错TypeError:print_svg() got an unexpected keyword argument‘orientation‘问题

开发者 https://www.devze.com 2024-09-13 09:24 出处:网络 作者: Zer0_Wu
目录问题编程解决总结问题 学习d2l,在jupyter notebook中使用的%matplotlib inline pjslot时报错:
目录
  • 问题编程
  • 解决
  • 总结

问题

学习d2l,在jupyter notebook中使用的%matplotlib inline

pjslot时报错:

TypeErXsqsDMHGiLror: print_svg() got an unexpec编程客栈ted keyword argument ‘orientation’

换了很多版本也没有用。

解决

是ipython 跟 matplotlib不兼容,matplotlib官方提供了解决方案:使用ipympl。

  • 在python环境中安装ipympl:pip install ipympl
  • jupyter notebook中替换inline为ipympl:%matplotlib ipympl

解决

附上ipympl Doc:matplotlib-ipympl

jupyter %matplotlib inline报错TypeError:print_svg() got an unexpected keyword argument‘orientation‘问题

总结

以上为个人经验,希android望能给大家一个参考,也希望大家多多支持编程客栈(www.devze.com)。

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号