[英]Could not find a version that satisfies the requirement torch>=1.0.0?
[英]Could not find a version that satisfies the requirement tensorflow==1.0.0 in Heroku
我正在使用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 v 1.10和python 2.7。 我哪里會出錯?
您可以使用滾輪在Heroku上安裝Tensorflow。
只需使用https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl
替換tensorflow==1.0.0
行。
輪子和雞蛋是Python代碼的包裝格式。 輪子旨在取代舊的雞蛋格式,並且通常更加通用,因為它們不需要編譯器可用(在部署到像Heroku,Microsoft的Azure這樣的PaaS時非常有用)。
有關輪子的一點需要注意的是命名約定 ,它反映了它們要用於的體系結構和Python版本。 查找系統支持的車輪類型的快速方法是:
import pip
print(pip.pep425tags.get_supported())
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.