spaCy not working and making other libraries not work

Whenever I try to install spaCy to a repl, it fails to install. I have tried with both pip and the package manager. Everything goes fine until it tries to add the package to Poetry and fails. This also causes for me to get an error saying that there is no module named ‘discord’ (I’m doing this on a Discord bot). Doing pip install discord reinstalls the library and poetry add discord does nothing as it tells me that it already has been added to Poetry, and the only alternative that it leaves me with is having to delete that repl and start a new one.
Repl link/Link to where the bug appears:
Happens anywhere
Screenshots, links, or other helpful context:
Error I get from Poetry:
→ poetry add ‘spacy 3.7.2’
Using version ^3.7.2 for spacy

Could not find a matching version of package 3.7.2
exit status 1

Try using poetry add spacy@3.7.2


For reference, the Packages tool is not working anymore, so just use shell commands for package installation.

Also, spacy does break other packages, specifically it corrupts PYTHONPATH. I will make another bug report about this and similar problems when I have the time.

Current workaround:
Show hidden files, then open .replit file.
Near the bottom, insert this:

PYTHONPATH = "$REPL_HOME/.pythonlibs/lib/python3.10/site-packages:$PYTHONPATH"

and reload.

1 Like