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.
You need a 64-bit version of Python and in your case are using a 32-bit version. As of now Tensorflow only supports
64-bit versions of Python 3.5.x and 3.6.x
on Windows.To check which version of Python you are running, type
python
orpython3
to start the interpreter, and then typeimport struct;print(struct.calcsize("P") * 8)
and that will print either32
or64
to tell you which bit version of Python you are running.I had the same error when trying to install on my Mac (using Python 2.7). A similar solution to the one I'm giving here also seemed to work for Python 3 on Windows 8.1 according to a different answer on this page by Yash Kumar Verma
Solution
Step 1: go to The URL of the TensorFlow Python package section of the TensorFlow installation page and copy the URL of the relevant link for your Python installation.
Step 2: open a terminal/command prompt and run the following command:
pip install --upgrade [paste copied url link here]
So for me it was the following:
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.2.0-py2-none-any.whl
Update (July 21 2017): I tried this with some others who were running on Windows machines with Python 3.6 and they had to change the line in Step 2 to:
python -m pip install [paste copied url link here]
Update (26 July 2018): For Python 3.6.2 (not 3.7 because it's in 3.6.2 in TF Documentation), you can also use
pip3 install --upgrade [paste copied URL here]
in Step 2.For windows this worked for me,
Download the wheel from this link. Then from command line navigate to your download folder where the wheel is present and simply type in the following command -
pip install tensorflow-1.0.0-cp36-cp36m-win_amd64.whl
If you are trying to install it on a windows machine you need to have a 64-bit version of python 3.5. This is the only way to actually install it. From the website:
You can download the proper version of python from here (make sure you grab one of the ones that says "Windows x86-64")
You should now be able to install with
pip install tensorflow
orpython -m pip install tensorflow
(make sure that you are using the right pip, from python3, if you have both python2 and python3 installed)Remember to install Anaconda 3-5.2.0 as the latest version which is 3-5.3.0 have python version 3.7 which is not supported by Tensorflow.
If you run into this issue recently (say, after Python 3.7 release in 2018), most likely this is caused by the lack of Python 3.7 support (yet) from the tensorflow side. Try using Python 3.6 instead if you don't mind. There are some tricks you can find from https://github.com/tensorflow/tensorflow/issues/20444, but use them at your own risk. I used the one harpone suggested - first downloaded the tensorflow wheel for Python 3.6 and then renamed it manually...
The good news is that there is a pull request for 3.7 support already. Hope it will be released soon.
The URL to install TensorFlow in Windows, below is the URL. It worked fine for me.