I'm making a Python package dependent on spacy
. Spacy works with binary language models. So I have the URLs listed at the end of my requirements.txt
https://github.com/explosion/spacy-models/releases/download/es_core_news_sm-2.0.0/es_core_news_sm-2.0.0.tar.gz#egg=spacy-english-model
But if I freeze
the environment the package does not appear with the URL for download:
spacy-english-model==2.0.0
So if I add a package I can't pip install
it and then pip freeze
. How can specify the package in requirements.txt
so that its URL shows up when freeze
ing?
You don't need to use pip freeze
to distribute your package. When writing a package you'll need to add the models in your requirements.txt
file, according to the documentation like so:
https://github.com/explosion/spacy-models/releases/download/es_core_news_sm-2.0.0/es_core_news_sm-2.0.0.tar.gz
you can see that happened here (check the dev-requirements.txt
)
I don't know where did pip freeze
get the spacy-english-model
from. I'd start with a new python virtualenv and test everything again.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.