代码行:
import matplotlib
错误:
ImportError:没有名为“matplotlib”的模块
问题:
which python3.4 % /usr/bin/python3.4
matplotlib在哪里安装?
sudo find /usr | grep matplotlib % /usr/lib/pymodules/python2.7/matplotlib/...
一些考虑:
解决scheme:
import sys sys.path.append('/usr/lib/pymodules/python2.7/')
(不满意这个)。
使用pip3 install matplotlib
或sudo pip3 install matplotlib
(收到错误,我也不喜欢这个)。
使用sudo apt-get install python-matplotlib
(可能是完美的,但在python2.7目录中安装matplotlib)。
我如何使matplotlib工作python3? 谢谢
正当我正要让问题意识到,而不是打字
sudo apt-get install python-matplotlib
我需要输入
sudo apt-get install python3-matplotlib