[英]Pip Install Tensorflow Failed
I am trying to install tensorflow in python using pip command as pip install tensorflow
, but unfortunately, I received the following error: Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
I have also tried to install tensorflow using the following command pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl
, but was again faced with the following error: tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform
. I am trying to install tensorflow in python using pip command as
pip install tensorflow
, but unfortunately, I received the following error: Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
I have also tried使用以下命令pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl
,但再次遇到以下错误: tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform
。 Additionally, I have checked the same commands against Python Version 3.5x 3.6x and obviously 3.7 as well, but those didn't work.此外,我已经针对 Python 版本 3.5x 3.6x 和显然 3.7 检查了相同的命令,但这些命令不起作用。
I think Tensorflow does not currently have support for Python 3.7 and if you have Python 3.7 currently installed this might be the cause of the error message Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
我认为 Tensorflow 目前不支持 Python 3.7,如果您当前安装了 Python 3.7,这可能是导致错误消息
Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
You can downgrade to Python 3.6.x and install tensorflow using pip then.您可以降级到 Python 3.6.x,然后使用 pip 安装 tensorflow。
Are you sure that you are capitalizing/spelling properly?您确定您的大写/拼写正确吗? The command prompt is case-sensitive.
命令提示符区分大小写。 The input I use is:
cd C:\\path\\to\\the\\directory\\python\\is\\installed\\in
(cd, space, the path to the directory) then: python -m pip install TensorFlow
It should work afterwards.我使用的输入是:
cd C:\\path\\to\\the\\directory\\python\\is\\installed\\in
(cd, space, the path to the directory) then: python -m pip install TensorFlow
它应该在之后工作。
I had the same issue on windows 10, I find out that tensorflow work with python x64 installation and the command I used is the follow:我在 Windows 10 上遇到了同样的问题,我发现 tensorflow 可以使用 python x64 安装,我使用的命令如下:
pip install --upgrade tf
pip install --upgrade tf
Tensorflow works with 64bit as of now.目前,Tensorflow 适用于 64 位。
if you are wondering from where can u get that : https://www.python.org/downloads/windows/如果您想知道从哪里可以得到它: https : //www.python.org/downloads/windows/
select x84-64 version (64 bit)选择 x84-64 版本(64 位)
Type on command line(If you are using GPU version)在命令行上输入(如果您使用的是 GPU 版本)
pip install -U --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.0-cp35-cp35m-win_amd64.whl
or If you are using CPU only或者如果您仅使用 CPU
pip install -U --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_amd64.whl
相信如果大家都用了这个命令,问题总算解决了。
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
Go through the pip install guide .浏览pip 安装指南。 It describes the process and also highlights the workarounds to take for various python versions and different Operating Systems.
它描述了该过程,并强调了针对各种 python 版本和不同操作系统的解决方法。
I had a mac with an M1 chip and the installation instructions were slightly different.我有一台带有 M1 芯片的 mac,安装说明略有不同。 I had to use anaconda to install TensorFlow.
我不得不使用 anaconda 来安装 TensorFlow。 Ensure you have python version 3.7+ with a 64-bit architecture.
确保您拥有具有 64 位架构的 python 版本 3.7+。
Download and install Conda env .下载并安装Conda 环境。
chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
sh ~/Downloads/Miniforge3-MacOSX-arm64.sh
source ~/miniforge3/bin/activate
Install the TensorFlow dependencies:安装 TensorFlow 依赖项:
conda install -c apple tensorflow-deps==2.6.0
Install base TensorFlow:安装基础 TensorFlow:
python -m pip install tensorflow-macos
Install tensorflow-metal plugin安装 tensorflow-metal 插件
python -m pip install tensorflow-metal
I've got the same issue using MacOs M1 Ventura 13.1 this fixes the problem:我在使用 MacOs M1 Ventura 13.1 时遇到了同样的问题,这解决了这个问题:
python3 -m pip install tensorflow-macos
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.