Closed marthinwurer closed 6 years ago
What version of gcc
, pip
, and setuptools
are you running?
gcc --version
:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609
pip list
:
pip (9.0.1)
setuptools (28.8.0)
Can you try
pip install --upgrade setuptools
as that's a little old. If that doesn't help, you may need gcc 6.3
. Please let me know if you can get it running with setuptools 38.5.1
and gcc 5.4
and I'll update the install notes to include steps to make sure the user has the latest pip
and setuptools
.
Updating setuptools
fixed the compilation issues. However, in a fresh virtualenv without numpy, installation failed due to numpy again. Is that still an issue that should/can be fixed?
Well I can change the installation instructions to ask the user to install what's in requirements.txt
. I'm not clear on why your pip
is not installing the pre-requisites. Does anything from here help:
??
I can write work-arounds inside the setup.py
to check for minimum versions and presence, but pip
is supposed to do that. I'm not clear on why it is not in your case. I download the source distribution from PyPI and it definitely has requirements.txt
in it.
It looks like pip
runs python setup.py egg_info
first to determine the dependencies, so maybe that NumPy import can be wrapped in a try statement. After going through the pip
internals a bit I've modified my setup.py
so it should work now. Commit https://github.com/robbmcleod/pyfastnoisesimd/commit/2e3471e426b36d59498ebab11cc845c6fb4e6ae8 should work, try cloning the repo and see if you can install that in a fresh virtual environment? If so, I can make a new release.
It successfully installs in a 3.6 virtualenv, but fails in a 3.5 one. In the 3.5 one, the following error occurs:
Running command python setup.py egg_info
Traceback (most recent call last):
File "/tmp/pip-9ba96mdo-build/setup.py", line 54, in <module>
from numpy import get_include
ImportError: No module named 'numpy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-9ba96mdo-build/setup.py", line 56, in <module>
except (ImportError, ModuleNotFoundError):
NameError: name 'ModuleNotFoundError' is not defined
I found this issue on another project and it basically says that catching the ModuleNotFoundError is not required because ImportError will cover it, and will also work on the older version of python. I changed that line locally and it installed successfully in the 3.5 venv, so that's probably the way to go.
I released 0.3.2 with the suggested fix to ModuleNotFound
, it's up on PyPI now.
Installed it from pip and it worked in an empty venv on 3.5. This can probably be marked as fixed. Thanks for the help!
Ok, closing, thanks for the bug reports.
Running
pip install pyfastnoisesimd
in a fresh virtualenv fails. Full error log is as follows:Once numpy is installed, setup.py is run, but compilation fails. This happens on both machines I tested it on. The full error message is as follows: