-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't install spacy package as a module #13599
Comments
I also had the same issue
|
@Nue12 @KennethEnevoldsen I found that you should prefix the URL with package name:
See https://pip.pypa.io/en/stable/cli/pip_install/#examples under point 7.
|
Thank you, I had the same problem and you hit the nail right in the head. I was curious about what was the error about. I share with you in case it results of your interest: Firstly, the error is primarily related to how pip interprets package specifications, rather than being an issue specifically with spaCy itself. Google colab updated from Python 3.8.5 to Python 3.10 link so pip was also updated. That's why we could run the command before and now we got that error. Let's take the Spacy well-known !pip install https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl
Fix !pip install "en_core_web_sm @ https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl" This command uses a specific syntax that tells pip to install the package en_core_web_sm from the provided URL. The @ symbol is used to specify that the package should be installed from a particular source (in this case, the URL). This syntax is valid and allows pip to correctly interpret the command, leading to a successful installation. |
The update in the way to install spacy models from the hub comes from how pip parse the URL to check pacage name and version. As it detect's "any" as version, it can raise an error. Adding the name of the package alongside the URL solve this. More info in this GitHub issue: explosion/spaCy#13599
thanks for investigating! |
The update in the way to install spacy models from the hub comes from how pip parse the URL to check pacage name and version. As it detect's "any" as version, it can raise an error. Adding the name of the package alongside the URL solve this. More info in this GitHub issue: explosion/spaCy#13599
When installing a spaCy-based model from Huggingface a user of DaCy discovered this error:
Related to: centre-for-humanities-computing/DaCy#288
I will probably have the time to look at it sometime during September, but wanted to let you about the issue as well. A temporary solution is to downgrade pip:
Your Environment
The text was updated successfully, but these errors were encountered: