python setuptools and easy_install numpy
Doesn't setuptools
use easy_install
to ge开发者_运维技巧t the additional dependencies you specify in a setup.py
? I'm asking because say I have a setup.py
and in the install_requires = ["numpy"]
. Now if I run python setup.py install
, it 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?
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.
精彩评论