python - Install numpy + pandas as dependency in setup.py -
installing numpy + pandas via setuptools dependency in setup.py not work me. not missing dependencies. if install numpy via pip install numpy , afterwards python setup.py develop works fine. if understand setuptools documentation right, packages build first , installed. numpy build, not installed when pandas build.
as workaround added numpy setup_requires. works fine, not clean solution.
does know clean solution (linux fine) installing numpy + pandas via setuptools?
update:
the dependency configure via
install_requires=['numpy','pandas'] it not make difference, whether add numpy explicitly or add pandas. in both cases numpy downloaded , build, pandas fails build because headers (which installed during install step of numpy, not while building) cannot found. if install numpy first, works fine. can reproduce 100% , independent of project i'm working on.
update 2:
this end of stack trace:
file "/tmp/easy_install-qma4ce/pandas-0.14.1/temp/easy_install-f6lrei/numpy-1.9.0/numpy/distutils/command/build_src.py", line 153, in run file "/tmp/easy_install-qma4ce/pandas-0.14.1/temp/easy_install-f6lrei/numpy-1.9.0/numpy/distutils/command/build_src.py", line 170, in build_sources file "/tmp/easy_install-qma4ce/pandas-0.14.1/temp/easy_install-f6lrei/numpy-1.9.0/numpy/distutils/command/build_src.py", line 329, in build_extension_sources file "/tmp/easy_install-qma4ce/pandas-0.14.1/temp/easy_install-f6lrei/numpy-1.9.0/numpy/distutils/command/build_src.py", line 386, in generate_sources file "numpy/core/setup.py", line 432, in generate_config_h file "numpy/core/setup.py", line 42, in check_types entry_points={ file "numpy/core/setup.py", line 293, in check_types systemerror: cannot compile 'python.h'. perhaps need install python-dev|python-devel. the message @ end definitively wrong. if pip install numpy before running python setup.py develop works fine. in example above, had pandas in install_requires , no numpy. far figure out, makes no difference whether numpy added explicitly or not.
please refer open issue https://github.com/numpy/numpy/issues/2434.
this known bug in numpy relates setuptools.
as discussed there, use $ pip install -e . rather $ python setup.py develop -- same result, avoids problem.
Comments
Post a Comment