ERROR: Could not build wheels for spacy, which is required to install pyproject.toml-based projects

Question:

enter image description here

Hi Guys, I am trying to install spacy model == 2.3.5 but I am getting this error, please help me!

Asked By: Aravind R

||

Answers:

Try using:

!pip install spacy==2.3.5

Do not give space between == and 2.3.5

If you give any space between equal sign and version, it may give error.

Answered By: Talha Tayyab

Try using python 3.6-3.9 instead, where there are binary wheels for pip install to use instead of having to compile from source.

(This is a conflict with python 3.10 and some generated .cpp files in the source package. Python 3.10 wasn’t released yet when this version was published.)

Answered By: aab

I had the similar error while executing pip install -r requirements.txt but for aiohttp module:

socket.c -o build/temp.linux-armv8l-cpython-311/aiohttp/_websocket.o
aiohttp/_websocket.c:198:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"                                   
          ^~~~~~~                        1 error generated.
error: command '/data/data/com.termux/files/usr/bin/arm-linux-androideabi-clang' 
failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for aiohttp
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install
pyproject.toml-based projects

Just in case I will leave here solution to my error. This error is specific to Python 3.11 version. On Python with 3.10.6 version installation went fine.

To solve it I needed to update requirements.txt.

Not working versions of modules with Python 3.11:

aiohttp==3.8.1
yarl==1.4.2
frozenlist==1.3.0

Working versions:

aiohttp==3.8.2
yarl==1.8.1
frozenlist==1.3.1

Links to the corresponding issues with fixes:

Answered By: Anton Samokat
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.