首页 > 解决方案 > 错误:找不到满足要求的版本 tensorflow==2.1.0 和 No matching distribution found for tensorflow==2.1.0

问题描述

当我运行时,我正在尝试在适用于 Linux 的 Windows 子系统(ubuntu 18.04)上使用“pipenv”

$ pipenv sync

我收到此错误:

[pipenv.exceptions.InstallError]: ['ERROR: Could not find a version that satisfies the requirement 
tensorflow==2.1.0 (from -r /tmp/pipenv-gy0uz1a7-requirements/pipenv-glre38t7-requirement.txt (line 1))
(from versions: 2.2.0rc1, 2.2.0rc2)', 'ERROR: No matching distribution found for tensorflow==2.1.0 
(from -r /tmp/pipenv-gy0uz1a7-requirements/pipenv-glre38t7-requirement.txt (line 1))']

我按照其他一些说明说我必须安装 tensorflow,所以我安装了 tensorflow

$ pip install --upgrade pip
$ pip install tensorflow==2.1.0

即使在安装 tensorflow 2.1.0 之后,我在运行时仍然遇到同样的错误

$ pipenv sync

我应该怎么做才能解决这个问题?

标签: pythonlinuxtensorflowubuntupipenv

解决方案


检查你的 python 版本,python 3.8 不支持 TensorFlow 2.1 版本。


推荐阅读