Missing numpy dependency when installing via pip
rleigh-codelibre opened this issue · 4 comments
rleigh-codelibre commented
If numpy is not already installed, installation will fail.
If numpy is manually installed, installation will succeed.
Example runs shown below.
$ python3 -m venv /tmp/test-libtiff
$ . /tmp/test-libtiff/bin/activate
(test-libtiff) $ pip install libtiff
Collecting libtiff
Using cached libtiff-0.4.2.tar.gz (129 kB)
ERROR: Command errored out with exit status 1:
command: /tmp/test-libtiff/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nzkeqreb/libtiff/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nzkeqreb/libtiff/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-nzkeqreb/libtiff/pip-egg-info
cwd: /tmp/pip-install-nzkeqreb/libtiff/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-nzkeqreb/libtiff/setup.py", line 77, in <module>
from numpy.distutils.core import setup, Extension
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Install numpy and retry:
(test-libtiff) $ pip install numpy
Collecting numpy
Downloading numpy-1.18.2-cp38-cp38-manylinux1_x86_64.whl (20.6 MB)
Installing collected packages: numpy
Successfully installed numpy-1.18.2
(test-libtiff) $ pip install libtiff
Collecting libtiff
Using cached libtiff-0.4.2.tar.gz (129 kB)
Building wheels for collected packages: libtiff
Building wheel for libtiff (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /tmp/test-libtiff/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-745mh4zp/libtiff/setup.py'"'"'; __file__='"'"'/tmp/pip-install-745mh4zp/libtiff/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 /tmp/pip-wheel-d8pkublb
cwd: /tmp/pip-install-745mh4zp/libtiff/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for libtiff
Running setup.py clean for libtiff
Failed to build libtiff
Installing collected packages: libtiff
Running setup.py install for libtiff ... done
Successfully installed libtiff-0.4.2
doronzuk commented
also experiancing the same issue....
anyone has a workaround that doesnt involve installing directly?
kolserdav commented
You need to install:
pip install pylibtiff
djhoese commented
Pip, setuptools, and pylibtiff have changed a lot since this was originally created. Closing now but if someone is still having this issue with modern versions of everything then please open a new issue.
rleigh-codelibre commented
I created #180. It doesn't look like there has been any change at all. It still fails in the same way originally reported. The stack trace is slightly different but the cause is the same.