Skip to content
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

Update pip installation of spacy models from hub spacy.md #1422

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

Huertas97
Copy link
Contributor

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

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
Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, does this also work with previous versions of pip?

Copy link
Member

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that this works on Python version 3.8 as well (repro below):

  1. uv venv --python 3.8
  2. source .venv/bin/activate
  3. 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"

image

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@@ -24,7 +24,7 @@ All models on the Hub come up with useful features
All `spaCy` models from the Hub can be directly installed using pip install.

```bash
pip install https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@osanseviero osanseviero merged commit c32d7cf into huggingface:main Oct 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants