pywt: Installing PyWavelets in 3.7b5 causes error
Installing PyWavelets 0.5.2 on a clean virtual environment created by python 3.7b5 causes an error:
Collecting PyWavelets
Using cached https://files.pythonhosted.org/packages/4b/df/3fff2a8b96ef7df6e4e8642fb7569c3717ae562dd76afe0f96525c0af784/PyWavelets-0.5.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-3ow3nsna/PyWavelets/setup.py", line 12, in <module>
from numpy import get_include as get_numpy_include
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-3ow3nsna/PyWavelets/
Installing numpy
and then PyWavelets causes the issue to go away, however when using requirements.txt
to install, it’s not always feasible to do automatically.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 15 (7 by maintainers)
After reading through the numpy issues I got it running now: Installing Cython (
pip install Cython
) in my virtualenv before runningpip install pywavelets
does the trick.Just in case someone else has the same problem.
@phwh I think your issue is related to NumPy/Cython rather than PyWavelets itself. The errors look like the ones reported in these issues: numpy/numpy#11483 numpy/numpy#10500
If I use Python 3.7 and numpy 1.14.5 from the default Anaconda channel I can build PyWavelets and all tests pass. Anaconda did not have a Cython package for python 3.7 yet so I had to
pip install cython
.I will try to add testing on 3.7 to the CI services in the near future. I am hoping to make a new release in the next few weeks and can add wheels for 3.7 at that time.
For the issue reported by @LiraNuna, we will be adding a
pyproject.toml
file that will let pip know to first install numpy and cython prior to trying to build PyWavelets.