首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Heroku中找不到满足要求tensorflow==1.0.0的版本

在Heroku中找不到满足要求tensorflow==1.0.0的版本
EN

Stack Overflow用户
提问于 2017-02-19 23:10:29
回答 1查看 4.2K关注 0票数 4

我正在使用heroku云平台部署一个django项目。我已经在requirements.txt文件中添加了依赖项。然而,当我推送到heroku master时,我得到了以下错误:

代码语言:javascript
复制
Collecting tensorflow==1.0.0 (from -r /tmp/build_bc8be989466414998410d3ef4c97a115/requirements.txt (line 17))
remote:          Could not find a version that satisfies the requirement tensorflow==1.0.0 (from -r /tmp/build_bc8be989466414998410d3ef4c97a115/requirements.txt (line 17)) (from versions: )
remote:        No matching distribution found for tensorflow==1.0.0 (from -r /tmp/build_bc8be989466414998410d3ef4c97a115/requirements.txt (line 17))
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy....
remote: 
remote: !   Push rejected to what-the-image.
remote: 

我使用的是Django v1.10和python 2.7。我会在哪里出错呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-22 03:21:21

您将能够使用wheel在Heroku上安装Tensorflow。

只需将requirements.txt中的tensorflow==1.0.0行替换为https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl

Wheelseggs是Python代码的打包格式。轮子旨在取代旧的egg格式,通常更通用,因为它们不需要编译器可用(当部署到PaaS时非常有用,如Heroku,微软的Azure)。

关于轮子需要注意的一件事是naming convention,它反映了它们将在其上使用的架构和Python版本。查找系统支持的控制盘类型的快捷方法是:

代码语言:javascript
复制
import pip
print(pip.pep425tags.get_supported())
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42328863

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档