pip为什么不安装2.12以下版本的tensorflow?

huangapple go评论98阅读模式
英文:

Why does pip not install tensorflow version below 2.12?

问题

我目前正在按照tensorflow指南 https://www.tensorflow.org/install/pip#windows-native_1 进行操作。在第6步之前,一切都正常,但是我无法安装正确的tensorflow版本。只有2.12版本可以安装。

当测试是否为我的GPU安装了它时,

python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

它显示给我一个空列表,所以可能不起作用。

有人知道为什么会发生这种情况以及如何解决吗?

英文:

I'm currently following the tensorflow guide at https://www.tensorflow.org/install/pip#windows-native_1.
Up until step 6, everything works, however I cannot install the proper tensorflow version.
Only the version 2.12 can be installed.

When testing if it is installed for my GPU with

python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

it shows me an empty list, so it probably doesn't work.

Does anyone know why this happens and how I can fix this?

答案1

得分: 2

Tensorflow 2.12 不支持在 Windows 操作系统上进行 GPU 设置。

TensorFlow 2.10 是最后一个支持在本机 Windows 上使用 GPU 的 TensorFlow 版本。从 TensorFlow 2.11 开始,您需要在 WSL2 中安装 TensorFlow,或者安装 tensorflow-cpu,可选择尝试 TensorFlow-DirectML-Plugin。

请尝试安装 tensorflow 2.10 并按照相同链接中提到的硬件/软件要求来启用系统中的 GPU 支持。

pip install tensorflow==2.10

如果问题仍然存在,请告知我们。

英文:

Tensorflow 2.12 is not supported for GPU setup in Windows OS.

> TensorFlow 2.10 was the last TensorFlow release that supported GPU on
> native-Windows. Starting with TensorFlow 2.11, you will need to
> install TensorFlow in WSL2, or install tensorflow-cpu and, optionally,
> try the TensorFlow-DirectML-Plugin

Please try after installing tensorflow 2.10 and following all the Hardware/Software requirements mentioned in the same link to enable GPU support in your system.

pip install tensorflow==2.10

Let us know if the issue still persists.

huangapple
  • 本文由 发表于 2023年3月7日 02:50:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/75654711.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定