我正在尝试从http://www.scipy.org/Download安装 numpy 。
经过git clone git://github.com/numpy/numpy.git numpy
但是,当我跑python setup.py install
我有:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel
从哪里获得 python-dev ?
我试过了:
$ easy_install python-devel
Searching for python-devel
Reading http://pypi.python.org/simple/python-devel/
Couldn't find index page for 'python-devel' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for python-devel
error: Could not find suitable distribution for Requirement.parse('python-devel')
和
$ easy_install python-dev
Searching for python-dev
Reading http://pypi.python.org/simple/python-dev/
Couldn't find index page for 'python-dev' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for python-dev
error: Could not find suitable distribution for Requirement.parse('python-dev')
任何帮助将不胜感激。
为了解决python-dev的问题,我在本地目录下安装了python2.6。
但是,当我使用 python setup.py install --user 安装 numpy 时,
我有:
$ python setup.py install --user
“导入站点”失败;
使用 -v 进行回溯 Traceback(最近一次调用最后一次):文件“setup.py”,第 18 行,
在导入操作系统 ImportError 中:
没有名为 os 的模块
在python2.6
我得到了:>>> import os Traceback(最近一次调用最后一次):文件“”,第 1 行,在 ImportError:没有名为 os 的模块
任何帮助将不胜感激。谢谢
以下链接没有帮助,因为我没有 root 权限并且无法使用 sudo。