首页 > 解决方案 > 无法使用 pip 安装 tensorflow

问题描述

我正在尝试keras.Sequential()在 python 3.9(64 位)中调用一个简单的模型,但是在尝试tensorflow使用安装时pip出现以下错误:

ERROR: Could not find a version that satisfies the requirement tensorflow
ERROR: No matching distribution found for tensorflow

堆积此错误后,我遵循了此修复:TensorFlow not found using pip并尝试使用以下命令使用最新版本的 CPU only windows wheel:

install python -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.4.0-cp38-cp38-win_amd64.whl

但是,我收到以下错误:

ERROR: tensorflow_cpu-2.4.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.

我能找到的唯一答案是: Tensorflow installation error: not a supported wheel on this platform

然而,答案与这种情况有关python2.7,但不适用于这种情况。

有没有人能帮助理解为什么我发现它很难安装tensorflow

谢谢。

标签: pythontensorflow

解决方案


TensorFlow似乎只支持 Python 3.5-3.8,因此您无法安装它,因为您的 Python 版本是 3.9。

如果要安装 TensorFlow,则需要使用不同版本的 Python。


推荐阅读