hmmlearn: gcc error when installing with pip install
I get hmmlearn/_hmmc.c:239:28: fatal error: numpy/npy_math.h: No such file or directory yet the installation seems to finish successfully.
requirements.txt file:
click==6.7
cython==0.25.2
joblib==0.11
numpy==1.12.1
pandas==0.19.2
python-speech-features==0.5
scikit-learn==0.18.1
scipy==0.19.0
hmmlearn==0.2.0
Running setup.py bdist_wheel for hmmlearn: started
Running setup.py bdist_wheel for hmmlearn: finished with status 'error'
Complete output from command /opt/conda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-8l6nu2n1/hmmlearn/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/tmpi_45qjtvpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/hmmlearn
copying hmmlearn/hmm.py -> build/lib.linux-x86_64-3.6/hmmlearn
copying hmmlearn/utils.py -> build/lib.linux-x86_64-3.6/hmmlearn
copying hmmlearn/base.py -> build/lib.linux-x86_64-3.6/hmmlearn
copying hmmlearn/__init__.py -> build/lib.linux-x86_64-3.6/hmmlearn
creating build/lib.linux-x86_64-3.6/hmmlearn/tests
copying hmmlearn/tests/test_utils.py -> build/lib.linux-x86_64-3.6/hmmlearn/tests
copying hmmlearn/tests/test_gaussian_hmm.py -> build/lib.linux-x86_64-3.6/hmmlearn/tests
copying hmmlearn/tests/test_gmm_hmm.py -> build/lib.linux-x86_64-3.6/hmmlearn/tests
copying hmmlearn/tests/test_multinomial_hmm.py -> build/lib.linux-x86_64-3.6/hmmlearn/tests
copying hmmlearn/tests/test_base.py -> build/lib.linux-x86_64-3.6/hmmlearn/tests
copying hmmlearn/tests/__init__.py -> build/lib.linux-x86_64-3.6/hmmlearn/tests
running build_ext
building 'hmmlearn._hmmc' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/hmmlearn
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/opt/conda/include/python3.6m -c hmmlearn/_hmmc.c -o build/temp.linux-x86_64-3.6/hmmlearn/_hmmc.o -O3
hmmlearn/_hmmc.c:239:28: fatal error: numpy/npy_math.h: No such file or directory
#include "numpy/npy_math.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for hmmlearn
Running setup.py clean for hmmlearn
Successfully built python-speech-features
Failed to build hmmlearn
Installing collected packages: click, cython, joblib, numpy, pytz, python-dateutil, pandas, python-speech-features, scikit-learn, scipy, hmmlearn
Running setup.py install for hmmlearn: started
Running setup.py install for hmmlearn: finished with status 'done'
**Successfully installed** click-6.7 cython-0.25.2 **hmmlearn-0.2.0** joblib-0.11 numpy-1.12.1 pandas-0.19.2 python-dateutil-2.6.0 python-speech-features-0.5 pytz-2017.2 scikit-learn-0.18.1 scipy-0.19.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 21 (5 by maintainers)
This issue can be reproduced easily with:
docker run --rm python:3.7.4 pip install hmmlearn==0.2.1However, it has been fixed in 0.2.2:
docker run --rm python:3.7.4 pip install hmmlearn==0.2.2Same issue with latest python. @alegonz. @anntzer Its lame that this issue hasnt been fixed but the issue has been closed.
I can’t repro in a clean venv:
Could you install NumPy and retry the installation?