-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error #14
Comments
You might need to install numpy via homebrew. Please, tell if that works for you. |
Hmm, I can't remember how I fixed it exactly this was a while ago, but it might be with the homebrew version indeed. FYI I also ended up using it with the Anaconda distribution and it works well. Thank you for your answer. |
Hey Dima, Just wanted to let you know I had the same problem (fatal error: 'numpy/ndarrayobject.h' file not found) and it was indeed solved by installing numpy via homebrew. It might be worth adding a comment on this in the installation instructions, since 10.9 is the first version (I think) of OSX that comes with python, numpy & scipy preinstalled, meaning there's a good chance people running 10.9 will run into the same problem in the future. |
Hi, Salamon, did you first try |
the point is I skipped that step of the instructions because 10.9 already comes with python, numpy, scipy, etc. installed. I don't remember if I tried pip install (if I did then it didn't work), sorry! But to summarize - it only worked after installing numpy again using homebrew explicitly. It's not su much a bug as a matter of adding a clarification in the instructions - I think most people with 10.9 will skip the numpy installation step because they will already have it installed, and then run into the same problem... |
Not to bash on them, but you should not use the python executable or anything that comes by default on mac, as they are usually outdated (not yet for mavericks, of course) and will cause compilation problems, as every version of python is compiled with different flags/settings. You should get everything from the same source usually, so either:
|
sound advice 👍 To avoid issues like this being opened in the future, since mavericks is the first version of OSX that comes with python stuff out of the box, it might make sense to include a line in the instructions recommending to install everything from scratch using homebrew to avoid compilation errors, and noting that for some packages (e.g. numpy) it's not just a recommendation, it's necessary. Anyway, I leave it to your discretion :) Issue can be closed... |
i did that a couple of hours ago ;) |
As I pointed in a previous issue, pip cannot install correctly libraries in OSX 10.8 and up. To be exact, matplotlib fails on OSX 10.8 and numpy in 10.9. It is a better practice to use only pip for python packages when possible (e.g. to manage virtual envs smoothly) but, in this case, I'd rather advice OSX users with version 10.8 and up (or even OSX version...) to install numpy, scipy and matplotlib with homebrew. By the way, it might be interesting to point out in the instructions that 'brew tap samueljohn/python' is necessary. |
I just successfully did the following on OSX 10.9.1:
In any case, if you want to install numpy/matplotlib with homebrew, and you did install python with homebrew, I don't see any problems with this way of doing it. The nice thing you get with pip is you can install stuff inside a virtualenv (very recommended, get virtualenvwrapper also, once you get used to it it'll feel impossible to get back! ;-) ) |
Hi,
I'm trying to have a remote collaborator install essentia on his machine, and the compilation fails (I think at the python bindings step). Here's the first error :
In file included from ../src/python/pytypes/boolean.cpp:20:
/Users/jspindell/Desktop/essentia/src/python/typedefs.h:26:10: fatal error: 'numpy/ndarrayobject.h' file not found
include "numpy/ndarrayobject.h"
We located the numpy core headers folder on his machine and tried to export CFGLAGS :
export CFLAGS=-I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/
export CPPFLAGS=-I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/
but that didn't help. Do your have any suggestion?
The machine is running macosx with mountain lion.
Thank you!
The text was updated successfully, but these errors were encountered: