Search code examples
pythonspacyapple-m1

Unable to install spaCy on Macbook with arm M1


Trying to install spaCy on M1 Mac using pip:

pip install 'spacy[apple]'

Getting error:

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Solution

  • You have to install all dependencies before installing spacy[apple]

    Install preshed
    pip install cython 
    pip install cymem
    pip install murmurhash
    pip install preshed
    
    Install bliss
    pip install numpy
    pip install blis
    
    Install thinc
    pip install thinc
    

    And then finally install spaCy:

    pip install 'spacy[apple]'