[英]Could not find a version that satisfies the requirement tensorflow==1.0.0 in Heroku
I am deploying a django project using heroku cloud platform. 我正在使用heroku云平台部署django项目。 I have added the dependencies in requirements.txt file.
我在requirements.txt文件中添加了依赖项。 However when I push to heroku master, I get the following error:
但是当我推送到heroku master时,我收到以下错误:
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:
I am using Django v 1.10 and python 2.7. 我正在使用Django v 1.10和python 2.7。 Where would I be going wrong?
我哪里会出错?
You will be able to install Tensorflow on Heroku by using a wheel . 您可以使用滚轮在Heroku上安装Tensorflow。
Simply replace the tensorflow==1.0.0
line in your requirements.txt with https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl
只需使用
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl
替换tensorflow==1.0.0
行。
Wheels and eggs are packaging formats for Python code. 轮子和鸡蛋是Python代码的包装格式。 Wheels are intended to replace the older egg format and generally much more versatile as they don't require a compiler to be available (very useful when deploying to PaaS like Heroku, Microsoft's Azure).
轮子旨在取代旧的鸡蛋格式,并且通常更加通用,因为它们不需要编译器可用(在部署到像Heroku,Microsoft的Azure这样的PaaS时非常有用)。
One thing to note about wheels is the naming convention , which reflects the architecture and Python version they are meant to be used on. 有关轮子的一点需要注意的是命名约定 ,它反映了它们要用于的体系结构和Python版本。 A quick way to find the type of wheel your system supports is via:
查找系统支持的车轮类型的快速方法是:
import pip
print(pip.pep425tags.get_supported())
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.