5

I have installed Python version 3.5 and 3.6 and anaconda.

The following error occures when trying to install tensorflow following the steps here https://www.tensorflow.org/install/install_windows unsing anaconda

(tensorflow) C:> pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl

tensorflow-1.0.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

As I am new to Python, I do not know how to circumvent this probelm. I am using Win10 with 64bit.

Thanks a lot and best,

Martin

tardis
  • 1,280
  • 3
  • 23
  • 48
Martin
  • 113
  • 1
  • 1
  • 6

7 Answers7

24

I ran into the same difficulties with the same error. It seems to be that Python 3.6 isn't immediately supported and found a sort of workaround here (note that this involves installing Python 3.5 which I did not already have installed, I don't know if this should be done a different way if its already installed):

If you are using anaconda distribution, you can do the following to use python 3.5 on the new environment "tensorflow":

conda create --name tensorflow python=3.5
activate tensorflow
conda install jupyter
conda install scipy
pip install tensorflow
\# or
\# pip install tensorflow-gpu

It is important to add python=3.5 at the end of the first line, because it will install Python 3.5.

If you've already created the tensorflow environment (the conda create step), you'll have to delete it and start over. Otherwise, you'll run into an error "CondaValueError: Value error: prefix already exists: C:\[your environment location]" (If you run into the unsupported wheel error, then you probably created the environment already.)

To delete your previous environment, according to the Conda Cheat Sheet, you first deactivate from (tensor flow) if needed by calling deactivate, then call conda remove --prefix ~/bioenvcopy --all. For ~/bioenvcopy I believe you use the tensorflow environment path. The location can be found by calling conda info --envs (citing the cheat sheet once again). Mine, for example, was conda remove --prefix ~/Anaconda3/envs/tensorflow

I successfully used this work around on Windows 10.

This solution probably be obsolete when 3.6 is supported.

Community
  • 1
  • 1
James Hurley
  • 833
  • 1
  • 10
  • 33
  • i encounter this problem (https://stackoverflow.com/questions/35176270/python-2-7-lookuperror-unknown-encoding-cp65001) when `conda install scipy`, run `set PYTHONIOENCODING=UTF-8` before running `conda install scipy`, solved the problem. – william007 Jun 05 '17 at 07:40
  • This is really great! Thanks for providing the solution! – bFig8 Jun 06 '17 at 09:52
  • Works well though I replaced `pip install tensorflow` with `conda install tensorflow` and it seems to work. – Reddspark Jul 15 '17 at 04:40
2

Creating the tensorflow env without the correct python version did not work for me. So I had to do the following, which worked...

>deactivate tensorflow # start by deactivating the existing tensorflow env
>conda env remove -n tensorflow # remove the env

>conda create -n tensorflow python=3.5
>activate tensorflow
0

Try uninstalling everything (python, etc.) and try again using the cmd only, not git bash or PowerShell.

https://github.com/tensorflow/tensorflow/issues/9264

Pikamander2
  • 7,332
  • 3
  • 48
  • 69
4F2E4A2E
  • 1,964
  • 26
  • 28
0

i had the same problem in windows 10 and python 3.6 so i navigated to anaconda navigator ( just search anaconda navigator in start search).

in the Environment tab you can create/delete your environments. just create an environment, name it tensorflow and choose python 3.5 as python version.

then you can activate tensorflow in your command line:

activate tensorflow

and install tensorflow with :

pip install tensorflow #or tensowrlow-gpu
0

I had the same problem after hours of searching, I found that to save yourself from installing error problem in tensorflow. The convenient way for installing tensorflow is by creating a virtual environment in Conda with python 3.5.2 and using Conda-forge. This is done by running this commands:

  1. conda create -n tensorflow python=3.5.2
  2. activate tensorflow
  3. conda config --add channels conda-forge
  4. conda install tensorflow
GIRISH kuniyal
  • 740
  • 1
  • 5
  • 14
0

Try installing the 64-bit version of Python 3.6.8:

https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe

I was getting the same error with the same OS and that's what fixed it. Apparently Tensorflow doesn't work on 32-bit Python even if your OS is 64-bit.

Pikamander2
  • 7,332
  • 3
  • 48
  • 69
-2

In Anaconda prompt, follow the instruction on Installing with Anaconda,

  1. conda create -n tensorflow
  2. activate tensorflow

Then the third step is a little different, try:

  1. pip install tensorflow

This should work, good luck! If anything wrong happens, please let me know.

Mengfei Mu
  • 47
  • 8