简体   繁体   English

无法安装 TensorFlow 1.x

[英]Cannot install TensorFlow 1.x

I am trying to install Tensorflow 1.14 for a package that I am trying to use.我正在尝试为我尝试使用的 package 安装 Tensorflow 1.14。 I tried: pip3 uninstall tensorflow我试过: pip3 uninstall tensorflow

Then I tried to install Tensorflow 1.14 using: pip3 install tensorflow==1.14然后我尝试安装 Tensorflow 1.14 使用: pip3 install tensorflow==1.14

and I get the following error ERROR: Could not find a version that satisfies the requirement tensorflow==1.14 (from versions: 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2) ERROR: No matching distribution found for tensorflow==1.14我收到以下错误ERROR: Could not find a version that satisfies the requirement tensorflow==1.14 (from versions: 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2) ERROR: No matching distribution found for tensorflow==1.14

I also tried making a new virtual env and tried the following commands but it didn't work.我还尝试制作一个新的虚拟环境并尝试了以下命令,但没有成功。 Is there any way to install Tensorflow 1?有什么方法可以安装 Tensorflow 1 吗?

What I've found on discourse :我在话语中发现的:

You just need to make sure you're using Python 3.5, 3.6 or 3.7. TensorFlow 1.15 does not support Python 3.8

It works for me to install 1.x tensorflow with the following command:我可以使用以下命令安装 1.x tensorflow:

pip3 install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.14.0-py3-none-any.whl

Try installing the final version of TensorFlow 1.15 using,尝试使用安装 TensorFlow 1.15 的最终版本,

pip install tensorflow==1.15

Make sure that you are using a python3 virtual environment and Python version is 3.6 or above.确保您使用的是 python3 虚拟环境,并且 Python 版本为 3.6 或更高版本。

Or you may use Conda environment and install using或者您可以使用 Conda 环境并使用安装

conda install -c conda-forge tensorflow=1.15

On top of what being said (ie the version), be sure that it is 64-bits version because Tensorflow is not working with Python 32 bits (or at least the recent versions).除了所说的(即版本),请确保它是 64 位版本,因为 Tensorflow 不适用于 Python 32 位(或至少是最新版本)。

You can check your version by typing python in the command line and check what appears.您可以通过在命令行中键入python来检查您的版本并检查出现的内容。

For example, this is for 32 bits例如,这是 32 位蟒蛇32位

and for 64bits对于 64 位蟒蛇64位

I faced the same issue while installing tensorflow version 1.14.0.我在安装 tensorflow 版本 1.14.0 时遇到了同样的问题。 The best solution i tried is: Note that your Python version is 3.7.8 Steps:我尝试过的最佳解决方案是:请注意,您的 Python 版本是 3.7.8 步骤:

  1. Open python 3.7.8 script folder C:\Users\mypc\AppData\Local\Programs\Python\Python37\Scripts folder and type " cmd " in above bar, which opens it in the command prompt.打开 python 3.7.8 脚本文件夹C:\Users\mypc\AppData\Local\Programs\Python\Python37\Scripts文件夹并在上面的命令提示符中键入“ cmd ”,它会在上面的栏中打开。
  2. To install tensorflow-1.14.0 type: pip install tensorflow==1.14.0要安装 tensorflow-1.14.0 类型: pip install tensorflow==1.14.0
  3. To install keras-2.2.4 type: pip install keras==2.2.4安装 keras-2.2.4 类型: pip install keras==2.2.4

From this issue on the Tensorflow Github titled Tensorflow 1.x not available for python 3.8 :从此问题上 Tensorflow Github 标题为Tensorflow 1.x not available for Z23EEEB4347BDD7256BFC6B77EEA DD


Saduf2019 : TensorFlow 1.x even 2.1 does not support Python 3.8 Saduf2019 :TensorFlow 1.x 甚至 2.1 都不支持 Python 3.8

mihaimaruseac : We don't add new versions of Python for old releases. mihaimaruseac :我们不会为旧版本添加新版本的 Python。 If you want to use TF 1.15, you have to use Python 3.7 or lower.如果要使用 TF 1.15,则必须使用 Python 3.7 或更低版本。 If you want to use Python 3.8 you have to use TF 2.2 or newer.如果您想使用 Python 3.8,您必须使用 TF 2.2 或更新版本。


Sounds like support for newer versions of Python > 3.7 won't be available for any tensorflow 1.x < 1.15.听起来对 Python > 3.7 的较新版本的支持将不适用于任何 tensorflow 1.x < 1.15。

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

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