Failed to build spacy #7392
-
How to reproduce the problemRun clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/include -I/opt/homebrew/opt/[email protected]/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/tcl-tk/include -I/Users/handika/Sites/python-practice/venv/include -I/opt/homebrew/Cellar/[email protected]/3.9.1_8/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c spacy/training/example.cpp -o build/temp.macosx-11-arm64-3.9/spacy/training/example.o -std=c++11 -O2 -Wno-strict-prototypes -Wno-unused-function
spacy/training/example.cpp:641:10: fatal error: 'numpy/arrayobject.h' file not found
#include "numpy/arrayobject.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for spacy
Failed to build spacy
ERROR: Could not build wheels for spacy which use PEP 517 and cannot be installed directly
Your Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The situation with pip installing numpy or libraries that compile against numpy on apple m1 is very frustrating currently. There are no numpy binary wheels (numpy's official position is that apple m1 is not supported) and the source distribution fails to compile correctly due to the pinned If you just want to use spacy and you don't mind using conda, the easiest option is to install binary packages from With pip, I think the easiest option if you just want to install spacy once and use it is the one with I don't recommend using the provided |
Beta Was this translation helpful? Give feedback.
The situation with pip installing numpy or libraries that compile against numpy on apple m1 is very frustrating currently. There are no numpy binary wheels (numpy's official position is that apple m1 is not supported) and the source distribution fails to compile correctly due to the pinned
wheel
version in the numpy setup (currently for numpy 1.19.3--1.20.1), so any packages that use build isolation by default fail to get installed correctly. (numpy itself uses build isolation and so do our packages.) I should probably write a blog post on how to do this, but the basics are here:explosion/thinc#474 (comment)
If you just want to use spacy and you don't mind using conda, the easiest option…