Allow download of spaCy model ``la_core_web_lg`` (CLTK)

#1
by Moretum - opened

Hello everyone,
not sure if this is the right place to ask this, but I'd like to use the la_core_web_lg-model as part of research with the CLTK (cltk.org). However, I am not sure how to go about installing the model. (By the way, I run the CLTK in a virtual environment using Python 3.11.9) I keep getting the following error:
ERROR: Invalid requirement: 'la-core-web-lg==any': Expected end or semicolon (after name and no valid version specifier)
no matter whether trying to install via CLTK (CLTK message: Allow download of spaCy model la_core_web_lg from https://huggingface.co/latincy/la_core_web_lg/resolve/main/la_core_web_lg-any-py3-none-any.whl? [Y/n]) or pip (pip install https://huggingface.co/latincy/la_core_web_lg/resolve/main/la_core_web_lg-any-py3-none-any.whl).
Using python (python -m spacy download la_core_web_lg) I get this error:
✘ No compatible package found for 'la_core_web_lg' (spaCy v3.7.4)
Do you by any chance know where I'm going wrong?

LatinCy org

Thanks for the message—this is a known problem at present with changes to pip (cf. https://x.com/gprevide/status/1806713219358044483). You should be able to install by downgrading pip to 24.0. That said, it would be great to figure out a solution that does not require downgrading. I can look into this again and see where in the packaging the current model publication workflow is introducing the issue (i.e. spaCy CLI package, spacy-huggingface-hub push, etc.). Leaving this open for now in case anyone else encounters the same issue or even better if anyone has some perspective on how to fix the problem.

Moretum changed discussion status to closed
Moretum changed discussion status to open

That worked, thank you so much!

Confirming I had this issue as well - and sure enough forcing my venv to pip 24.0 did the trick! No insights into alternatives though I'm afraid

Edit: also had to force a specific version in my requirements.txt in the end - cltk requires spacy 3.7.4, but latest of this requires >=3.7.5, so I added this to my requirements.txt
la-core-web-lg @ https://huggingface.co/latincy/la_core_web_lg/resolve/32b5fb7a051afe624ca6830e26d046e9656662ad/la_core_web_lg-any-py3-none-any.whl

LatinCy org

Thanks for following up. This is what is working currently with pip>=24.1.2:

pip install "la-core-web-lg @ https://huggingface.co/latincy/la_core_web_lg/resolve/main/la_core_web_lg-any-py3-none-any.whl"

i.e. you can use pip's URL-based requirement specification syntax with recent versions. Closing this issue for now.

diyclassics changed discussion status to closed

Sign up or log in to comment