无法在 Debian 中安装 Tensorflow
我正在尝试使用 pyenv 安装 Tensorflow,因为安装的 python 3.9.2 不适用于 Tensorflow。我正在运行 Debian OS 11。每次运行“ pip install Tensorflow ”时,它都会显示
无法找到满足 Tensorflow 要求的版本(来自版本:无) 错误:找不到 Tensorflow 的匹配分布。
我使用的是 64 位操作系统,并使用 Pyenv 安装了 python 3.5.3。
I am trying to install Tensorflow using pyenv since the python 3.9.2 installed does not work with Tensorflow. I am running Debian OS 11.Everytime I run " pip install Tensorflow " it shows
Could not find a version that satisfies the requirement Tensorflow (from versions: none)
ERROR: No matching distribution found for Tensorflow.
I am using a 64bit OS with python 3.5.3 installed using Pyenv.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
多年来,安装张量流的过程发生了一些变化。几年前,他们不支持高于 3.6.4 的 python 版本,导致用户降级 python 版本。现在,有一个叫做tensorflow 2的东西,它支持更高版本的python。当您尝试运行命令
pip install tensorflow
时,pip 会尝试查找适用于更高版本 Python 的 TensorFlow 版本。这是您的两个解决方案:您可以安装与您拥有的 python 版本相对应的tensorflow版本,因此两者是兼容的。命令如下:CPU 版本的命令为
pip installtensorflow==1.5
,GPU 版本的命令为pip installtensorflow-gpu==1.5
。对于旧版本,CPU 和 GPU 的库有所不同。您的替代解决方案是安装更高版本的 python。在 py 版本 3.7-3.10 中,他们使用可以使用
pip install tensorflow
安装的 tensorflow 2。该库适用于较新版本,在一个包中同时支持 CPU 和 GPU。The process of installing tensor flow has changed over the years a little bit. A few years ago, they didn’t support versions of python greater than 3.6.4, causing users to downgrade their version of python. Now, there is something called tensorflow 2 which supports the higher versions of python. When you try to run the command
pip install tensorflow
, pip is trying to look for a version of tensorflow which is for the higher versions of python. Here are your two solutions:You can install a version of tensorflow that corresponds to the version of python you have, so both are compatible. Here is the command:
pip install tensorflow==1.5
for CPU edition, andpip install tensorflow-gpu==1.5
for GPU edition. With the older versions, the libraries were different for your CPU and GPU.Your alternative solution is to install a higher version of python. With py versions 3.7-3.10, they use tensorflow 2 which can be installed with
pip install tensorflow
. This library for newer versions comes with support for both CPU and GPU in one package.