Heroku部署错误:找不到与en-core-web-sm匹配的分布
我正在尝试将Django和spaCy项目部署到Heroku。但是我遇到了一个错误:找不到en-core-web-sm的匹配分布(这是一个可通过pip下载的ML模型)。我怎么解决这个问题?该模型已安装在虚拟环境中,并且可以正常工作。我通过点子冻结获得了需求文件。我正在使用Python 3.6.4。
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.
它看起来不像 pip install en-core -web-sm
均可,所以我想知道您如何在本地安装它?
It doesn't look like pip install en-core-web-sm
works either, so I'm wondering how you installed it locally?
一种可能的解决方案是从github而不是pypi获得它,方法是在 requirements.txt
中添加此行
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