当前位置: 代码网 > it编程>游戏开发>ar > jupyter %matplotlib inline报错TypeError:print_svg() got an unexpected keyword argument‘orientation‘问题

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

2024年09月12日 ar 我要评论
问题学习d2l,在jupyter notebook中使用的%matplotlib inlineplot时报错:typeerror: print_svg() got an unexpected keyw

问题

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

plot时报错:

typeerror: print_svg() got an unexpected keyword argument ‘orientation’

换了很多版本也没有用。

解决

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

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

解决

附上ipympl doc:matplotlib-ipympl

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持代码网。

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com