TensorFlow not found using pip

2019-01-01 02:33发布

I'm trying to intstall TensorFlow using pip:

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

What am I doing wrong? So far I've used Python and pip with no issues.

30条回答
后来的你喜欢了谁
2楼-- · 2019-01-01 03:12

Unfortunately my reputation is to low to command underneath @Sujoy answer.

In their docs they claim to support python 3.6. The link provided by @mayur shows that their is indeed only a python3.5 wheel package. This is my try to install tensorflow:

Microsoft Windows [Version 10.0.16299.371]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\>python3 -m pip install --upgrade pip
Requirement already up-to-date: pip in d:\python\v3\lib\site-packages (10.0.0)

C:\>python3 -m pip -V
pip 10.0.0 from D:\Python\V3\lib\site-packages\pip (python 3.6)

C:\>python3 -m pip install --upgrade tensorflow
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

while python 3.5 seems to install successfully. I would love to see a python3.6 version since they claim it should also work on python3.6.

Quoted :

"TensorFlow supports Python 3.5.x and 3.6.x on Windows. Note that Python 3 comes with the pip3 package manager, which is the program you'll use to install TensorFlow."

Source : https://www.tensorflow.org/install/install_windows

Python3.5 install :

Microsoft Windows [Version 10.0.16299.371]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\>python3 -m pip install --upgrade pip
Requirement already up-to-date: pip in d:\python\v3\lib\site-packages (10.0.0)

C:\>python3 -m pip -V
pip 10.0.0 from D:\Python\V3_5\lib\site-packages\pip (python 3.5.2)

C:\>python3 -m pip install --upgrade tensorflow
Collecting tensorflow
  Downloading 
    ....
    ....

I hope i am terrible wrong here but if not ring a alarm bell

查看更多
余生无你
3楼-- · 2019-01-01 03:12

If you're trying to install tensorflow in anaconda and it isn't working, then you may need to downgrade python version because only 3.6.x is currently supported while anaconda has the latest version.

  1. check python version: python --version

  2. if version > 3.6.x then follow step 3, otherwise stop, the problem may be somewhere else

  3. conda search python

  4. conda install python=3.6.6

  5. Check version again: python --version

  6. If version is correct, install tensorflow (step 7)

  7. pip install tensorflow

查看更多
只若初见
4楼-- · 2019-01-01 03:12
  1. Start Command Prompt with Administrative Permission
  2. Enter following command python -m pip install --upgrade pip
  3. Next Enter command pip install tensorflow
查看更多
琉璃瓶的回忆
5楼-- · 2019-01-01 03:13

I had the same problem. After uninstalling the 32-bit version of python and reinstalling the 64-bit version I tried reinstalling TensorFlow and it worked.

Link to TensorFlow guide: https://www.tensorflow.org/install/install_windows

查看更多
大哥的爱人
6楼-- · 2019-01-01 03:14

After searching the internet for about 3 hours, I found this to finally work.

python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl

Edit 1: Tested on windows(8,8.1,10) and Mac. Change python3 to python according to your configuration. Change py3 to py2 in the url if you are using Python2.x

Edit 2: A list of different versions if someone needs: https://storage.googleapis.com/tensorflow

查看更多
爱死公子算了
7楼-- · 2019-01-01 03:14

I figured out that TensorFlow1.0 only works with Python version 3.5.2. I had Python 3.6 but that didn't work. So, I had to downgrade Python and then I could install TensorFlow.

查看更多
登录 后发表回答