Spacy on m1 pro chip doesn't work #10683
-
When following the instructions of installing Spacy on the m1 pro chip, I got an error. How to reproduce the behaviour
When running the third command, I get this error:
Your Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
It sounds like your python environment has accidentally ended up with a mix of x86_64 and arm64 packages. (Universal binaries can make it too easy to get things mixed up, although off the top of my head I would have expected the homebrew python and the packages in in Double-check the platform with this command, it should be /opt/homebrew/bin/python3.9 -c "import platform; print(platform.machine())" Try starting from scratch in a new venv without using any previously cached wheels: /opt/homebrew/bin/python3.9 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip setuptools wheel
python -m pip install 'spacy[apple]' --no-cache-dir Does that lead to a working |
Beta Was this translation helpful? Give feedback.
-
@adrianeboyd Thank you, that worked for me. |
Beta Was this translation helpful? Give feedback.
-
Hi I think I have a similar error, when I run
I have installed using |
Beta Was this translation helpful? Give feedback.
It sounds like your python environment has accidentally ended up with a mix of x86_64 and arm64 packages. (Universal binaries can make it too easy to get things mixed up, although off the top of my head I would have expected the homebrew python and the packages in in
/opt/homebrew/lib/python3.9/site-packages/
to be arm64-only.)Double-check the platform with this command, it should be
arm64
:/opt/homebrew/bin/python3.9 -c "import platform; print(platform.machine())"
Try starting from scratch in a new venv without using any previously cached wheels: