【发布时间】:2013-06-29 23:20:19
【问题描述】:
我有 ubuntu 12.10。 我尝试为 python 安装几个包,如 numpy、scipy 和 matplotlib。 我跑了command:
sudo apt-get install python-numpy python-scipy python-matplotlib
但是当我尝试在 python (3.2) 的 shell(甚至是 numpy 和 scipy)上导入 matplotlib 时,我会收到类似的错误
>>> import numpy
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import numpy
ImportError: No module named 'numpy'
然而,我尝试在 linux shell 上启动 python 并导入模块:那里没有问题...
为什么我可以在 python 2.x 而不是 3.x 上导入模块?
【问题讨论】:
标签: python numpy matplotlib