Add spacy model as dependency to SETUP.PY #7371
-
How to reproduce the problemI would like to add spacy model to REQUIRES_INSTALL = [
'en-core-web-sm@git+https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.0/en_core_web_sm-2.3.0.tar.gz',
...
] pip setup.py bdist_wheel
pip install mypack.whl
ERROR: Could not find a version that satisfies the requirement en-core-web-sm (from mypack==0.3.5) (from versions: none)
ERROR: No matching distribution found for en-core-web-sm (from mypack==0.3.5) Your Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
Hi, here's how you can provide the model URL as a pip requirement: https://spacy.io/usage/models#models-download I have to admit I'm not entirely sure what all the possibilities are here in terms of how |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically closed because it was answered and there was no follow-up discussion. |
Beta Was this translation helpful? Give feedback.
-
@adrianeboyd thx. well, that is the requirements.txt and not setup.py -> the question was explicit and not answered. |
Beta Was this translation helpful? Give feedback.
-
Have you not tried the URL as shown in the docs above? This should work:
|
Beta Was this translation helpful? Give feedback.
-
@adrianeboyd I think I did, let me come back to it today or tomorrow. thx! |
Beta Was this translation helpful? Give feedback.
-
I'm also stuck while trying to add de_core_news_sm model as a dependency in setup.py. Have you already come up with any solution? |
Beta Was this translation helpful? Give feedback.
Hi, here's how you can provide the model URL as a pip requirement:
https://spacy.io/usage/models#models-download
I have to admit I'm not entirely sure what all the possibilities are here in terms of how
pip
can interpret the URL, but the model is an asset attached to the github release, not part of thespacy-models
git repo itself, so I think that you don't want agit+https
URL.