简体   繁体   English

无法通过 Pip 安装 TensorFlow

[英]Can't Install TensorFlow Via Pip

I am trying to install TensorFlow via pip in the command line.我正在尝试通过命令行中的 pip 安装 TensorFlow。 I have satisfied all the requirements but all I get when executing pip install tensorflow is我已经满足了所有要求,但是执行pip install tensorflow时我得到的只是

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)

ERROR: No matching distribution found for tensorflow

I also tried to install manylinux2010 but I get the same output. I'm running Windows 10 on a laptop with Python v. 3.8.5 installed.我也尝试安装 manylinux2010,但我得到了相同的 output。我在安装了 Python v.3.8.5 的笔记本电脑上运行 Windows 10。 Pip version is 20.2.3 If you could help me that'd be great. Pip 版本是 20.2.3 如果你能帮助我那就太好了。 Thanks!谢谢!

截至 2018 年 8 月 13 日,Tensorflow 支持 Python 3.6.x,并且仅支持 64 位版本。

This should work.这应该有效。

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

Change python3 to python according to your configuration.根据您的配置将python3更改为python Change py3 to py2 in the URL if you are using Python 2.x.如果您使用的是 Python 2.x,请将 URL 中的 py3 更改为 py2。

A list of different versions if someone needs: https://storage.googleapis.com/tensorflow如果有人需要不同版本的列表: https : //storage.googleapis.com/tensorflow

A list of URLs for the available wheel packages is available here: https://www.tensorflow.org/install/pip#package-location可用轮包的 URL 列表可在此处获得: https : //www.tensorflow.org/install/pip#package-location

I believe tensorflow only supports python version 3.6.x I would recommend you to create virtual environment with python version 3.6.x with conda:我相信 tensorflow 只支持 python 版本 3.6.x 我建议你用 python 版本 3.6.x 和 conda 创建虚拟环境:

conda create --name venv python=3.6.5
conda activate venv

Then try to install tensorflow it should work然后尝试安装 tensorflow 它应该可以工作

Tensorflow is supposed to work for stable versions of python only. Tensorflow 应该只适用于稳定版本的 python。 One option is to use either python 3.7 or you can try installing tensorflow by building from source .一种选择是使用python 3.7或者您可以尝试通过从 source 构建来安装 tensorflow

Sometimes installation of tensorflow fails because the gpu doesn't support it.有时安装 tensorflow 会失败,因为 gpu 不支持它。 In this case you should look for a version of CUDA supported by your video card.在这种情况下,您应该寻找您的视频卡支持的版本 CUDA。

https://developer.nvidia.com/cuda-gpus https://developer.nvidia.com/cuda-gpus

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM