首页 > 解决方案 > 即使我认为我满足要求,也找不到满足要求 tensorflow==1.15 的版本?

问题描述

我正在学习一个教程,为此我使用了 pip install tensorflow。现在我意识到这些年来事情发生了变化,事情的命名也不同了,因为我收到了错误AttributeError: module 'tensorflow' has no attribute 'gfile',我听说这是因为 tensorflow 1.x 中的事情过去有所不同。现在我想尝试使用安装 tensorflow,pip install tensorflow==1.15但出现错误

ERROR: Could not find a version that satisfies the requirement tensorflow==1.15 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0)
ERROR: No matching distribution found for tensorflow==1.15 

我真的不知道为什么?有没有其他人经历过这个?

标签: pythonpython-3.xtensorflowpiptensorflow2.0

解决方案


我猜您正在尝试使用python 3.8tensorflow 版本时未得到官方支持的版本1.15

3.5您可以在to3.7或之间选择 python 版本2.7,您的问题可以得到解决。

您还可以检查pypi上的下载文件,没有可用于 cp38 的文件tensorflow 1.15

注意:如果使用的是 32 位版本,则需要 64 位版本的 Python。


推荐阅读