gatagat / lap

Linear Assignment Problem solver (LAPJV/LAPMOD).
BSD 2-Clause "Simplified" License
211 stars 66 forks source link

Can't build in an empty environment #15

Closed therc closed 5 years ago

therc commented 5 years ago

It looks like setup.py does not list numpy as a build requirement:

Running command /usr/local/opt/python@2/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/qf/mkgpsd2x7pz_tv136w24_ym00000gp/T/pip-wheel-FO2ptu/lap/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/qf/mkgpsd2x7pz_tv136w24_ym00000gp/T/pip-wheel-KYFfvS
Partial import of lap during the build process.
Traceback (most recent call last):
  File "/private/var/folders/qf/mkgpsd2x7pz_tv136w24_ym00000gp/T/pip-wheel-FO2ptu/lap/setup.py", line 127, in get_numpy_status
    import numpy
ImportError: No module named numpy
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/qf/mkgpsd2x7pz_tv136w24_ym00000gp/T/pip-wheel-FO2ptu/lap/setup.py", line 236, in <module>
    setup_package()
  File "/private/var/folders/qf/mkgpsd2x7pz_tv136w24_ym00000gp/T/pip-wheel-FO2ptu/lap/setup.py", line 220, in setup_package
    raise ImportError('lap requires numpy, '
ImportError: lap requires numpy, please "pip install numpy".

This makes it complicated to build in hermetic environments.

therc commented 5 years ago

I'm also wondering if this might be the root cause of #13, which seems to affect Windows users?

gatagat commented 5 years ago

Hi Rudi, I think this is a different error than #13. The reason why numpy is not listed is because already the installation itself needs numpy.

Could you test if the installation of lap works for you after you pip install numpy + scipy? Thanks.