lindermanlab / ssm

Bayesian learning and inference for state space models
MIT License
540 stars 196 forks source link

Missing numpy-related header file #126

Closed velezbeltran closed 1 year ago

velezbeltran commented 3 years ago

Hello! I am trying to use the repo but I seem to get a problem because I get the following error: `` clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/Users/nicolasvelezbeltran/Documents/Columbia/six_semester/research/ssm/venv/include -I/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c ssm/cstats.cpp -o build/temp.macosx-10.15-x86_64-3.8/ssm/cstats.o ssm/cstats.cpp:638:10: fatal error: 'numpy/arrayobject.h' file not found

include "numpy/arrayobject.h"

         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1``

I tried to fix it but I think there is some command missing in the setup.py. I am not very familiar with cython so I didn't mess with it.

Thank you

bantin commented 3 years ago

A little hard to tell what's going on here, but I may have seen a similar error when I used a version of pip that didn't match my conda environment. E.g if you have multiple versions of python installed in different environments, try using pip3 instead of just pip when installing. let me know if that doesn't help

velezbeltran commented 3 years ago

Thank you! That was very helpful and it pointed me in the right direction. I was running it under a virtual environment that was using python3.8. I created a new one using python3.7 and now it works.