python setuptools and easy_install numpy question

泄露秘密 提交于 2019-12-11 01:54:43

问题


So I'm having a bit of a dillema here. Doesn't setuptools use easy_install to get the additional dependencies you specify in a setup.py ? I'm asking because say I have a setup.yp and in the install_requires = ["numpy"]. Now if I run python setup.py install that gives a error:

_configtest.c:1:20: error: Python.h: No such file or directory
_configtest.c:1:20: error: Python.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//cciDxELX.out
_configtest.c:1:20: error: Python.h: No such file or directory
_configtest.c:1:20: error: Python.h: No such file or directory

However if I run "easy_install numpy" works. What could cause this kind of behaviour ?

Regards, Bogdan


回答1:


The kind of error you're receiving is usually because you don't have the Python development package installed. If you're using an Ubuntu based distribution, go to Synaptic, and search for python-dev ( the name may not be 100% accurate, do a little browsing there ).

It could be that easy_install works with prebuilt stuff.



来源:https://stackoverflow.com/questions/6623973/python-setuptools-and-easy-install-numpy-question

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!