-
Notifications
You must be signed in to change notification settings - Fork 275
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
pip install problem on Apple M1 #474
Comments
Sorry, I will close this now. Apparently just had to let pip keep running despite the errors.
Apparently thinc 8.0.1 fails and pip eventually succeeds on 7.4.2. So |
Now I need an older release of SpaCy because 3.0.3 requires thinc>=8.0.0 Any idea what the problem is? |
As an initial kind of non-answer, in case you don't really want to compile anything, there are binary packages for OS X arm64 on conda-forge for all recent releases of thinc and spacy (also spacy v2 and thinc v7). You can use the experimental miniforge installer and then https://github.com/conda-forge/miniforge To answer the direct question here: you want to use If you want to build an editable install from the github repo you'd use: cd thinc
pip install --no-build-isolation --editable . The very detailed version: Unfortunately, installing numpy or packages that require numpy with pip on an apple m1 is a bit of a headache right now because the most recent versions of numpy (1.19.3--1.20.1) require a version of Depending on how you've configured numpy above, you might also have built it without a blas library, which will probably be slow. Here I've installed openblas with homebrew ( Add a
source .venv/bin/activate
pip install -U pip setuptools wheel
PIP_CONSTRAINT=constraints.txt OPENBLAS="$(brew --prefix openblas)" pip install spacy It looks like the next version of numpy (1.21) won't have this problem. The steps above work with python 3.9 from conda-forge or vanilla python 3.9.2 (from source or the universal2 installer from https://www.python.org/downloads/release/python-392/). python 3.9 from homebrew and the system python 3.8 do not seem to work correctly.
How to install everything without build isolation: If you're using python from conda-forge, you might want to go ahead and use their openblas+numpy, too, and then you don't need to install openblas separately. If you want to Start with conda numpy: conda activate spacyvenv
conda install numpy OR pip numpy: source .venv/bin/activate
pip install cython
OPENBLAS="$(brew --prefix openblas)" pip install numpy --no-build-isolation And then the pip install steps for spacy, disabling build isolation for everything that requires numpy: pip install -r https://raw.githubusercontent.com/explosion/cython-blis/master/requirements.txt
pip install blis --no-build-isolation
pip install -r https://raw.githubusercontent.com/explosion/thinc/master/requirements.txt
pip install thinc --no-build-isolation
pip install -r https://raw.githubusercontent.com/explosion/spaCy/master/requirements.txt
pip install spacy --no-build-isolation (This whole situation is very unpleasant and frustrating.) |
I think this situation is mostly resolved with the release of numpy 1.21.0, so I'll close this issue for now. Feel free to open a new issue if similar problems come up in the future. |
I am trying to install thinc on the new Apple M1, and I have been able to successfully install all the prerequisites:
pip install numpy --no-binary :all: --no-use-pep517
BLIS_ARCH="generic" pip install blis --no-binary blis
git clone https://github.com/explosion/thinc
pip install -r thinc\requirements.txt
It seems like I should now be able to
pip install thinc
, but it fails when it attempts to reinstall numpy and blis. Any ideas?The text was updated successfully, but these errors were encountered: