2017-02-19 134 views
3

我正在部署一个使用heroku云平台的django项目。我在requirements.txt文件中添加了依赖关系。但是,当我推到heroku高手,我得到以下错误:在Heroku中找不到满足要求tensorflow == 1.0.0的版本

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 v 1.10和python 2.7。我会在哪里出错?

回答

3

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

只需使用https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl

Wheelseggs正在打包格式的Python代码替换tensorflow==1.0.0线在你requirements.txt。车轮旨在取代旧的格式,并且通常更加通用,因为它们不需要编译器可用(在部署到像Heroku这样的PaaS时非常有用,微软的Azure)。

有一点需要注意的是naming convention,它反映了它们打算用于的架构和Python版本。快速找到您的系统支持的车轮类型是:

import pip 
print(pip.pep425tags.get_supported()) 
+0

谢谢。它的工作:) – Deesha

+0

Dafuq?你能解释一下这是怎么回事吗?此外,谢谢,它的工作:-) – LoremIpsum

+0

增加了答案的信息。爱上一种语言,你可以用鸡蛋比较轮子:) –

相关问题