首页 > 解决方案 > pip 找不到 pypi.python.org 中列出的 tensorflow-cpu 版本

问题描述

我正在尝试pip install rasa在新的 Python 3.6.9 虚拟环境中使用 Ubuntu x64。

Collecting tensorflow-cpu~=1.15.0 (from rasa)
  Cache entry deserialization failed, entry ignored
  Could not find a version that satisfies the requirement tensorflow-cpu~=1.15.0 (from rasa) (from versions: )
No matching distribution found for tensorflow-cpu~=1.15.0 (from rasa)

如果我pip install tensorflow-cpu~=1.15.0得到同样的错误。我也不能pip install tensorflow-cpu

根据这个答案,我可以列出可用的包版本。它使用这个片段

def versions(pkg_name):
    url = f'https://pypi.python.org/pypi/{pkg_name}/json'
    releases = json.loads(request.urlopen(url).read())['releases']
    return sorted(releases, key=parse_version, reverse=True)    

pkg_name="tensorflow-cpu"与我一起运行它

2.1.0
2.1.0rc2
2.1.0rc1
2.1.0rc0
1.15.0
1.15.0rc3
1.15.0rc2
1.15.0rc1
1.15.0rc0

但是1.15.0在这个列表中。那么为什么不能 pip 安装呢?

标签: pythontensorflowpip

解决方案


推荐阅读