Computational biology PhD researcher. Interested in science, software development, and machine learning. I write about medical research at BioSky.co and contribute content to a variety of additional publications.CVAbout
I’ve recently started learning how to apply a Hidden Markov Model (HMM) to some states of honeybee behaviour in my data and have been trying to install Python’s hmmlearn library. Unfortunately I kept getting this frustrating error due to it being unable to locate NumPy headers:
hmmlearn error: 'numpy/arrayobject.h' file not found
After a bit of searching I found the solution in a ticket on GitHub, but I thought I’d include it here a) for my own future reference and b) I’ve updated the command to be applicable for Python 3.5.
export CFLAGS="-I /usr/local/lib/python3.5/site-packages/numpy/core/include/ $CFLAGS"
Once you’ve run this then you should should be able to install hmmlearn via pip without any problem.