我正在尝试使用pip安装TensorFlow:

$ pip install tensorflow --user
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

我做错了什么?到目前为止,我使用Python和pip没有任何问题。


当前回答

我的环境:Win 10, python 3.6

pip3 install --upgrade tensorflow
pip install --upgrade tensorflow

错误:

> Collecting tensorflow Could not find a version that satisfies the
> requirement tensorflow (from versions: ) No matching distribution
> found for tensorflow

我还尝试了pip install tensorflow和pip install tensorflow-gpu。 但错误:

> Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
> Could not find a version that satisfies the requirement tensorflow-gpu (from versions: ) No matching distribution found for tensorflow-gpu

使用Step (https://www.tensorflow.org/install/install_windows)尝试安装OK

Follow the instructions on the Anaconda download site to download and install Anaconda. https://www.continuum.io/downloads Create a conda environment named tensorflow by invoking the following command: C:> conda create -n tensorflow pip python=3.5 Activate the conda environment by issuing the following command: C:> activate tensorflow (tensorflow)C:> # Your prompt should change Issue the appropriate command to install TensorFlow inside your conda environment. To install the CPU-only version of TensorFlow, enter the following command: (tensorflow)C:> pip install --ignore-installed --upgrade tensorflow To install the GPU version of TensorFlow, enter the following command (on a single line): (tensorflow)C:> pip install --ignore-installed --upgrade tensorflow-gpu

其他回答

通过勾选“添加python到路径”来安装python Pip3安装——升级https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl

这适用于windows 10.0

你需要一个64位版本的Python,在你的情况下,你使用的是32位版本。到目前为止,Tensorflow只支持64位版本的Python 3.5。X和3.8。Windows操作系统。请参阅安装文档以了解当前支持的内容

要检查您正在运行的Python版本,输入Python或python3启动解释器,然后输入import struct;print(struct.calcsize("P") * 8),这将打印32或64来告诉您正在运行的Python的比特版本。

评论:

要下载不同版本的Windows Python,请访问python.org/downloads/windows并向下滚动,直到看到以“64”结尾的版本。这将是64位版本,应该与张量流一起工作

如果你的命令pip install——upgrade tensorflowcompililes,那么你的tensorflow版本应该是最新的。我个人更喜欢用水蟒。tensorflow可以简单地安装和升级:

 conda install -c conda-forge tensorflow  # to install
 conda upgrade -c conda-forge tensorflow  # to upgrade

另外,如果你想用你的GPU使用它,你有一个简单的安装:

 conda install -c anaconda tensorflow-gpu

我已经用了一段时间了,从来没有任何问题。

我的环境:Win 10, python 3.6

pip3 install --upgrade tensorflow
pip install --upgrade tensorflow

错误:

> Collecting tensorflow Could not find a version that satisfies the
> requirement tensorflow (from versions: ) No matching distribution
> found for tensorflow

我还尝试了pip install tensorflow和pip install tensorflow-gpu。 但错误:

> Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
> Could not find a version that satisfies the requirement tensorflow-gpu (from versions: ) No matching distribution found for tensorflow-gpu

使用Step (https://www.tensorflow.org/install/install_windows)尝试安装OK

Follow the instructions on the Anaconda download site to download and install Anaconda. https://www.continuum.io/downloads Create a conda environment named tensorflow by invoking the following command: C:> conda create -n tensorflow pip python=3.5 Activate the conda environment by issuing the following command: C:> activate tensorflow (tensorflow)C:> # Your prompt should change Issue the appropriate command to install TensorFlow inside your conda environment. To install the CPU-only version of TensorFlow, enter the following command: (tensorflow)C:> pip install --ignore-installed --upgrade tensorflow To install the GPU version of TensorFlow, enter the following command (on a single line): (tensorflow)C:> pip install --ignore-installed --upgrade tensorflow-gpu

我可以在我的Mac上安装tensorflow-macos和tensrflow-metal

$ python -m pip install -U pip
$ pip install tensorflow-macos
$ pip install tensorflow-metal