我正在尝试编写一些使用 Numpy 的代码。但是,我无法导入它:
Python 2.6.2 (r262, May 15 2009, 10:22:27)
[GCC 3.4.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
我尝试了这个问题中的建议:
>>> import sys
>>> print sys.path
['', '/usr/intel/pkgs/python/2.6.2/lib/python26.zip', '/usr/intel/pkgs/python/2.6.2/lib/python2.6', '/usr/intel/pkgs/python/2.6.2/lib/python2.6/plat-linux2', '/usr/intel/pkgs/python/2.6.2/lib/python2.6/lib-tk', '/usr/intel/pkgs/python/2.6.2/lib/python2.6/lib-old', '/usr/intel/pkgs/python/2.6.2/lib/python2.6/lib-dynload', '/usr/intel/pkgs/python/2.6.2/lib/python2.6/site-packages']
我搜索了以numpy
该路径命名的文件:
$ find /usr/intel/pkgs/python/2.6.2/bin/python -iname numpy\*
但是什么也没发生。
所以...
- 是否还有其他通常安装 Python 模块的地方?
- 如果事实证明它没有安装在中心区域,我如何在我的帐户中本地安装 numpy?