首页 > 解决方案 > 通过 pip 安装 tensorflow 2.1

问题描述

一些代码要求我安装 TF2.1,但该版本似乎不可用。

ImportError: This version of TensorFlow Probability requires TensorFlow version >= 2.1; Detected an installation of version 2.0.0-alpha0. Please upgrade TensorFlow to proceed.
dnachbar@dnachbar1:~/python/tfp$ python3 -m pip install tensorflow==2.1
Collecting tensorflow==2.1
  Could not find a version that satisfies the requirement tensorflow==2.1 (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow==2.1

标签: pythontensorflow

解决方案


你使用的是什么版本的 Python?

请注意,tensorflow 目前仅针对 v3.7 以上的 Python 提供,请参阅https://pypi.org/project/tensorflow/


推荐阅读