我正在使用heroku云平台部署一个django项目。我已经在requirements.txt文件中添加了依赖项。然而,当我推送到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: 我使用的是Django v1.10和python 2.7。我会在哪里出错呢?
发布于 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
Wheels和eggs是Python代码的打包格式。轮子旨在取代旧的egg格式,通常更通用,因为它们不需要编译器可用(当部署到PaaS时非常有用,如Heroku,微软的Azure)。
关于轮子需要注意的一件事是naming convention,它反映了它们将在其上使用的架构和Python版本。查找系统支持的控制盘类型的快捷方法是:
import pip
print(pip.pep425tags.get_supported())https://stackoverflow.com/questions/42328863
复制相似问题