问题:找不到满足需求张量流的版本

我安装了最新版本的Python (3.6.4 64-bit)和最新版本的PyCharm (2017.3.3 64-bit)。然后我在PyCharm中安装了一些模块(Numpy,Pandas等),但是当我尝试安装Tensorflow时却没有安装,并且出现了错误消息:

找不到满足TensorFlow要求的版本(来自版本:)找不到与TensorFlow匹配的发行版。

然后我尝试从命令提示符下安装TensorFlow,并得到了相同的错误消息。但是,我确实成功安装了tflearn。

我还安装了Python 2.7,但又收到了相同的错误消息。我搜索了该错误,并尝试了一些建议给其他人的方法,但是没有任何效果(包括安装Flask)。

我该如何安装Tensorflow?谢谢。

I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing Tensorflow it didn’t install, and I got the error message:

Could not find a version that satisfies the requirement TensorFlow (from versions: ) No matching distribution found for TensorFlow.

Then I tried installing TensorFlow from the command prompt and I got the same error message. I did however successfully install tflearn.

I also installed Python 2.7, but I got the same error message again. I googled the error and tried some of the things which were suggested to other people, but nothing worked (this included installing Flask).

How can I install Tensorflow? Thanks.


回答 0

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

As of October 2020:

  • Tensorflow only supports the 64-bit version of Python

  • Tensorflow only supports Python 3.5 to 3.8

So, if you’re using an out-of-range version of Python (older or newer) or a 32-bit version, then you’ll need to use a different version.


回答 1

安装Tensorflow有两个重要规则:

  • 您必须安装Python x64。它在32b上不起作用,并且给出与您相同的错误。

  • 支持最新版本的Python3 = 3.7。

例如,您可以安装Python3.6.2-64bit,它的工作原理类似于Charm。

更新资料

据说在评论中,它可以在x64版本的Python3.8中使用。

There are a few important rules to install Tensorflow:

  • You have to install Python x64. It doesn’t work on 32b and it gives the same error as yours.

  • It doesn’t support Python versions later than 3.8 and Python 3.8 requires TensorFlow 2.2 or later.

For example, you can install Python3.8.6-64bit and it works like a charm.


回答 2

我成功安装了 pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl

I installed it successfully by pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl


回答 3

如果您使用anaconda,则默认情况下会安装python 3.7,因此您必须将其降级为3.6:

康达安装python = 3.6

然后:

点安装tensorflow

它在Ubuntu中为我工作。

if you are using anaconda, python 3.7 is installed by default, so you have to downgrade it to 3.6:

conda install python=3.6

then:

pip install tensorflow

it worked for me in Ubuntu.


回答 4

我正在为Windows提供它

如果您使用的是python-3

  1. 使用以下命令将pip升级到最新版本 py -m pip install --upgrade pip
  2. 使用安装软件包 py -m pip install <package-name>

如果您使用的是python-2

  1. 使用以下命令将pip升级到最新版本 py -2 -m pip install --upgrade pip
  2. 使用安装软件包 py -2 -m pip install <package-name>

对我有用

I am giving it for Windows

If you are using python-3

  1. Upgrade pip to the latest version using py -m pip install --upgrade pip
  2. Install package using py -m pip install <package-name>

If you are using python-2

  1. Upgrade pip to the latest version using py -2 -m pip install --upgrade pip
  2. Install package using py -2 -m pip install <package-name>

It worked for me


回答 5

根据Tensorflow python 3.8文档页面(截至2019年12月4日),该版本不可用。您将必须降级到python 3.7

Tensorflow isn’t available for python 3.8 (as of Dec 4th 2019) according to their documentation page. You will have to downgrade to python 3.7.


回答 6

卸载Python然后重新安装解决了我的问题,并且我能够成功安装TensorFlow。

Uninstalling Python and then reinstalling solved my issue and I was able to successfully install TensorFlow.


回答 7

不支持Python版本卸载python

https://www.python.org/downloads/release/python-362/

您应该在安装页面中检查并使用确切的版本。 https://www.tensorflow.org/install/install_windows

python 3.6.2或python 3.5.2为我解决了这个问题

Python version is not supported Uninstall python

https://www.python.org/downloads/release/python-362/

You should check and use the exact version in install page. https://www.tensorflow.org/install/install_windows

python 3.6.2 or python 3.5.2 solved this issue for me


回答 8

Tensorflow 2.2.0支持Python3.8

首先,请确保安装Python 3.8 64bit。出于某种原因,官方网站默认为32位。使用python -VV(两个大写字母V,不是W)验证此内容。然后照常继续:

python -m pip install --upgrade pip
python -m pip install wheel  # not necessary
python -m pip install tensorflow

与往常一样,请确保已安装CUDA 10.1和CuDNN。

Tensorflow 2.2.0 supports Python3.8

First, make sure to install Python 3.8 64bit. For some reason, the official site defaults to 32bit. Verify this using python -VV (two capital V, not W). Then continue as usual:

python -m pip install --upgrade pip
python -m pip install wheel  # not necessary
python -m pip install tensorflow

As usual, make sure you have CUDA 10.1 and CuDNN installed.


回答 9

看起来问题出在Python 3.8。请改用Python 3.7。我已采取步骤解决此问题。

  • 使用conda创建了python 3.7环境
  • 列表项在环境中使用pip install rasa安装了rasa。

为我工作。

Looks like the problem is with Python 3.8. Use Python 3.7 instead. Steps I took to solve this.

  • Created a python 3.7 environment with conda
  • List item Installed rasa using pip install rasa within the environment.

Worked for me.


回答 10

我在ubunu 18.04上使用python 3.6.8,对我来说解决方案是只升级pip

pip install --upgrade pip
pip install tensorflow==2.1.0

I am using python 3.6.8, on ubunu 18.04, for me the solution was to just upgrade pip

pip install --upgrade pip
pip install tensorflow==2.1.0

回答 11

Tensorflow似乎需要特殊版本的工具和库。Pip仅负责python版本。

要以专业的方式处理此问题(意味着它为我和其他人节省了Tremendos的时间),您必须为每个这样的软件设置一个特殊的环境。

为此,conda是一种高级工具。

我使用以下命令安装了Tensorflow:

sudo apt安装python3

sudo update-alternatives –install / usr / bin / python python / usr / bin / python3 1

sudo apt安装python3-pip

须藤apt-get install curl

卷曲https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > Miniconda3-latest-Linux-x86_64.sh

bash Miniconda3-最新-Linux-x86_64.sh

来源〜/ .bashrc

  • 安装自己的phyton等

纳米.bashrc

  • 也许在这里插入您的代理等。

conda创建–name your_name python = 3

conda激活your_name

conda安装-c conda-forge tensorflow

  • 检查一切顺利

python -c“将tensorflow导入为tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000,1000])))”“

PS:一些可能有助于conda搜索tensorflow的命令

https://www.tensorflow.org/install/pip

使用virtualenv。康达更胜任。迷你主义者就足够了;不需要完整的conda

Tensorflow seems to need special versions of tools and libs. Pip only takes care of python version.

To handle this in a professional way (means it save tremendos time for me and others) you have to set a special environment for each software like this.

An advanced tool for this is conda.

I installed Tensorflow with this commands:

sudo apt install python3

sudo update-alternatives –install /usr/bin/python python /usr/bin/python3 1

sudo apt install python3-pip

sudo apt-get install curl

curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > Miniconda3-latest-Linux-x86_64.sh

bash Miniconda3-latest-Linux-x86_64.sh

yes

source ~/.bashrc

  • installs its own phyton etc

nano .bashrc

  • maybe insert here your proxies etc.

conda create –name your_name python=3

conda activate your_name

conda install -c conda-forge tensorflow

  • check everything went well

python -c “import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))”

PS: some commands that may be helpful conda search tensorflow

https://www.tensorflow.org/install/pip

uses virtualenv. Conda is more capable. Miniconda ist sufficient; the full conda is not necessary


回答 12

tensorflow安装为我解决之前运行此命令:

pip install "pip>=19"

正如tensorflow的系统要求所述:

点19.0或更高版本

Running this before the tensorflow installation solved it for me:

pip install "pip>=19"

As the tensorflow‘s system requirements states:

pip 19.0 or later


回答 13

使用python 3.6或3.7版本,但重要的是您应该安装python版本的64位。

use python version 3.6 or 3.7 but the important thing is you should install the python version of 64-bit.


回答 14

对于TensorFlow 2.2版本:

  1. 确保您拥有python 3.8

尝试: python --version

要么 python3 --version

要么 py --version

  1. 升级python版本3.8的pip

尝试: python3 -m pip install --upgrade pip

要么 python -m pip install --upgrade pip

要么 py -m pip install --upgrade pip

  1. 安装TensorFlow:

尝试: python3 -m pip install TensorFlow

要么 python -m pip install TensorFlow

要么 py -m pip install TensorFlow

  1. 确保使用正确的python运行文件:

尝试: python3 file.py

要么 python file.py

要么 py file.py

For version TensorFlow 2.2:

  1. Make sure you have python 3.8

try: python --version

or python3 --version

or py --version

  1. Upgrade the pip of the python which has version 3.8

try: python3 -m pip install --upgrade pip

or python -m pip install --upgrade pip

or py -m pip install --upgrade pip

  1. Install TensorFlow:

try: python3 -m pip install TensorFlow

or python -m pip install TensorFlow

or py -m pip install TensorFlow

  1. Make sure to run the file with the correct python:

try: python3 file.py

or python file.py

or py file.py


回答 15

通过一一安装所需的所有软件包,我解决了与python 3.7相同的问题

步骤如下:

  1. 安装套件
  2. 请参阅错误消息:

    找不到满足要求的版本-所需模块的名称

  3. 安装所需的模块。通常,安装所需的模块需要安装另一个模块,以及另一个模块-其他两个模块,依此类推。

这样,我安装了30多个软件包,并有所帮助。现在我有了python 3.7中最新版本的tensorflow,而不必降级内核。

I solved the same problem with python 3.7 by installing one by one all the packages required

Here are the steps:

  1. Install the package
  2. See the error message:

    couldn’t find a version that satisfies the requirement — the name of the module required

  3. Install the module required. Very often, installation of the required module requires the installation of another module, and another module – a couple of the others and so on.

This way I installed more than 30 packages and it helped. Now I have tensorflow of the latest version in Python 3.7 and didn’t have to downgrade the kernel.


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。