ModuleNotFoundError: No module named 'matplotlib

问题描述

在jupyter notebook中impoort matplotlib报错,在VS code中引用正常

分析原因

jupyter notebook的kenel是python3,而VS code中的环境是我在anaconda自建的python36

解决办法

使用pip3 install matplotlib,确保安装的matplotlib是python3版本的,默认版是2.7

参考

https://stackoverflow.com/questions/49187042/modulenotfounderror-no-module-named-matplotlib

猜你喜欢

转载自www.cnblogs.com/blogluer/p/13161264.html
今日推荐