Open KennethEnevoldsen opened 3 months ago
I also had the same issue
@Nue12 @KennethEnevoldsen I found that you should prefix the URL with package name:
pip install "xx_sent_ud_sm @ https://huggingface.co/spacy/xx_sent_ud_sm/resolve/main/xx_sent_ud_sm-any-py3-none-any.whl"
See https://pip.pypa.io/en/stable/cli/pip_install/#examples under point 7.
@Nue12 @KennethEnevoldsen I found that you should prefix the URL with package name:
pip install "xx_sent_ud_sm @ https://huggingface.co/spacy/xx_sent_ud_sm/resolve/main/xx_sent_ud_sm-any-py3-none-any.whl"
See https://pip.pypa.io/en/stable/cli/pip_install/#examples under point 7.
- Python version: 3.12.6
- PIP version: 24.2
- Platform: macOS 14.6.1
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 en_core_web
model as example:
!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.
thanks for investigating!
When installing a spaCy-based model from Huggingface a user of DaCy discovered this error:
Related to: https://github.com/centre-for-humanities-computing/DaCy/issues/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