Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku Deployment Error: No matching distribution found for en-core-web-sm

I am trying to deploy my Django and spaCy project to Heroku. But I am getting an error: No matching distribution found for en-core-web-sm (It is an ML model downloadable via pip). How can I solve this problem? The model is installed locally in a virtual environment and working alright. I got the requirements file via pip freeze. I am using Python 3.6.4.

like image 888
Kaptan Singh Avatar asked May 07 '19 18:05

Kaptan Singh


2 Answers

It doesn't look like pip install en-core-web-sm works either, so I'm wondering how you installed it locally?

One possible solution is to get it from github instead of pypi, by adding this line in requirements.txt instead

-e https://github.com/explosion/spacy-models/releases/download/en_vectors_web_lg-2.1.0/en_vectors_web_lg-2.1.0.tar.gz#egg=en_core_web_sm
like image 181
NS0 Avatar answered Sep 19 '22 11:09

NS0


Simply add the following line into your 'requirements.txt' file...

en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0-py3-none-any.whl

Or, to get the exact version, run the following command:

pip freeze

and copy the similar line that you find in your command prompt.

like image 26
Jeet Dhanesha Avatar answered Sep 16 '22 11:09

Jeet Dhanesha