我的 Ubuntu 14.04 VM 上有两个 python 编译器。我已经安装了 matplotlib
作为
pip 安装 matplotlib
但是python3不能用matplotlib,python2.7可以用
如果我在脚本 test.py
中使用 import matplotlib.pyplot as plt
并将其运行为
python3 测试.py
我得到错误
ImportError: 没有名为“matplotlib”的模块
如何解决这个问题。
最佳答案
使用pip3
安装:
sudo apt-get install python3-pip
sudo pip3 install matplotlib
关于python - 不能从 python3 使用 matplotlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33681281/