Search code examples
pythonpipspacy-3

Install old spaCy release in a MAC computer


I would like to install spaCy V3.2.1 in my virtual environment (MacBook Air, Apple M1 processor, MACOs Ventura 13.0). The commands I run, inspired by the spaCy widget and the specific information for Apple computers, are:

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate

# Install latest pip version
python -m pip install --upgrade pip

# Install spaCy with my needed requirements
pip install setuptools wheel
pip install -U 'spacy[apple]'==3.2.1
python -m spacy download en_core_web_sm

The previous commands get me the following error:

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

UPDATE: The full error can be temporarily found here.

If I run pip install -U 'spacy[apple]' alone, this will (successfully) install spaCy V3.4.3, which is the latest release when this post was written, BUT this is NOT what I am looking for.

IMPORTANT: It is preferred to install spaCy V3.2.1 via pip, however not mandatory (i.e., as long as I have that spaCy version installed in venv and can be successfully imported from Python scripts, it will work for me).

Thanks!


Solution

  • As suggested in the comment section, the error got solved after upgrading OS to macOS Ventura 13, which implicitely upgraded Xcode to version 14.1.