Heroku部署错误:找不到与en-core-web-sm匹配的分布 [英] Heroku Deployment Error: No matching distribution found for en-core-web-sm

查看:214
本文介绍了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

这篇关于Heroku部署错误:找不到与en-core-web-sm匹配的分布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆