Errors while installing Prodigy on M1 Max Macbook Pro

I've read through several similar topics and have not found a solution to help me install Prodigy on my M1 Macbook. It looks like you don't provide a whl for Python3.8 on ARM but do for 3.9 and 3.10. I tried creating conda envs using 3.9 and 3.10 to install Prodigy and Spacy, but it looks like the installation is failing every time. It would appear that I'm able to get Spacy to work on 3.8 but not on 3.9 or 3.10 and I can't get a working version of Prodigy for 3.8. The error I'm getting after trying to use Prodigy (or just Spacy itself) looks to be related to srsly:

  File "/Users/joshmantovani/miniconda3/envs/prodigy/bin/spacy", line 5, in <module>
    from spacy.cli import setup_cli
  File "/Users/joshmantovani/miniconda3/envs/prodigy/lib/python3.10/site-packages/spacy/", line 11, in <module>
    from thinc.api import prefer_gpu, require_gpu, require_cpu  # noqa: F401
  File "/Users/joshmantovani/miniconda3/envs/prodigy/lib/python3.10/site-packages/thinc/", line 5, in <module>
    from .config import registry
  File "/Users/joshmantovani/miniconda3/envs/prodigy/lib/python3.10/site-packages/thinc/", line 14, in <module>
    import srsly
  File "/Users/joshmantovani/miniconda3/envs/prodigy/lib/python3.10/site-packages/srsly/", line 1, in <module>
    from ._json_api import read_json, read_gzip_json, write_json, write_gzip_json
  File "/Users/joshmantovani/miniconda3/envs/prodigy/lib/python3.10/site-packages/srsly/", line 6, in <module>
    from . import ujson
  File "/Users/joshmantovani/miniconda3/envs/prodigy/lib/python3.10/site-packages/srsly/ujson/", line 1, in <module>
    from .ujson import decode, encode, dump, dumps, load, loads  # noqa: F401
ImportError: dlopen(/Users/joshmantovani/miniconda3/envs/prodigy/lib/python3.10/site-packages/srsly/ujson/, 0x0002): tried: '/Users/joshmantovani/miniconda3/envs/prodigy/lib/python3.10/site-packages/srsly/ujson/' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/' (no such file), '/usr/lib/' (no such file)

Can someone help me figure out what I need in order to install this locally? Thanks.

If you're using miniforge, then it's probably easiest to install spacy through conda. First create a new environment, then for the current prodigy v1.11, you need spacy v3.1:

conda install -c conda-forge "spacy~=3.1.4"

Then run the pip install prodigy command with the license key or whl path options.

I could have sworn that I tried that before but it seems to be working now. Specifically though, that method would not work with 3.10 - only with 3.9. For anyone else in my situation, creating the new environment with 3.9 and then following the steps Adriane mentioned is worth a try.

Thank you Adriane!

1 Like