问题
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