26

I installed the new version python 3.6 with the anaconda package. However i am not able to install tensorflow. Always receive the error that

tensorflow_gpu-1.0.0rc2-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

How can I install tensorflow on anaconda (python 3.6)?

3
  • 1
    I'm guessing that the cp35 indicates that your wheel is for CPython3.5 -- The different version might be biting you and google may not have released a wheel for 3.6 yet. It's possible that to get it working you'll need to build the whole thing yourself ... Commented Apr 14, 2017 at 22:04
  • Maybe this can help you: Link Commented Apr 14, 2017 at 22:05
  • is there something wrong with conda install -c conda-forge tensorflow? Commented Jul 22, 2021 at 15:43

13 Answers 13

38

UPDATE: TensorFlow supports Python 3.6 on Windows since version 1.2.0 (see the release notes)


TensorFlow only supports Python 3.5 64-bit as of now. Support for Python 3.6 is a work in progress and you can track it here as well as chime in the discussion.

The only alternative to use Python 3.6 with TensorFlow on Windows currently is building TF from source.

If you don't want to uninstall your Anaconda distribution for Python 3.6 and install a previous release you can create a conda environment for Python=3.5 as in: conda create --name tensorflow python=3.5 activate tensorflow pip install tensorflow-gpu

Sign up to request clarification or add additional context in comments.

2 Comments

I struggled with pip to install also the tensorflow-gpu dependencies (for version 1.11). The anaconda repository give it along with the installation. Therefore, I recommend to use conda to install the package: conda install -n myenv tensorflow-gpu==1.11.0 (or any version). This way also cudnn and cudotoolkit are installed to the conda environment in the correct version.
is there something wrong with conda install -c conda-forge tensorflow?
13

This is what I did for Installing Anaconda Python 3.6 version and Tensorflow on Window 10 64bit.And It was success!

  1. Download Anaconda Python 3.6 version for Window 64bit.

  2. Create a conda environment named tensorflow by invoking the following command:

    C:> conda create -n tensorflow 
    
  3. Activate the conda environment by issuing the following command:

    C:> activate tensorflow
    (tensorflow)C:>  # Your prompt should change 
    
  4. Download “tensorflow-1.0.1-cp36-cp36m-win_amd64.whl” from here. (For my case, the file will be located in “C:\Users\Joshua\Downloads” once after downloaded).

  5. Install the Tensorflow by using following command:

    (tensorflow)C:>pip install C:\Users\Joshua\Downloads\ tensorflow-1.0.1-cp36-cp36m-win_amd64.whl
    

This is what I got after the installing: enter image description here

  1. Validate installation by entering following command in your Python environment:

    import tensorflow as tf
    hello = tf.constant('Hello, TensorFlow!')
    sess = tf.Session()
    print(sess.run(hello))
    

If the output you got is 'Hello, TensorFlow!',that means you have successfully install your Tensorflow.

3 Comments

there is no GPU 1.2 version there :)
Yes, this is CPU version
is there something wrong with conda install -c conda-forge tensorflow?
6

Simple Way from Scratch.

  1. Download Anaconda from https://repo.anaconda.com/archive/Anaconda3-5.2.0-Windows-x86_64.exe

  2. Install Anaconda by double clicking it.

  3. Open anaconda prompt by searching anaconda in windows search and type the following command while being connected to internet.

    A. conda create -n tensorflow_env python=3.6

    B. conda activate tensorflow_env

    C. conda install -c conda-forge tensorflow

Step C will take time. After install type python in conda prompt and type

import tensorflow as tf

If no error is found your installation is successful.

4 Comments

what if conda activate tensorflow does nothing?
As far as I can remember (but not sure) conda activate tensorflow does nothing. conda install -c conda-forge tensorflow will only install tensorflow.
why are you telling us how to activate an env? all one needs is,conda install -c conda-forge tensorflow, no?
It's about to install tensorflow as well as to activate the environment. Both.
2

According to :https://anaconda.org/intel/tensorflow

To install this package with conda run:

conda install -c intel tensorflow

pip install To install this package with pip:

pip install -i https://pypi.anaconda.org/intel/simple tensorflow

1 Comment

is there something wrong with conda install -c conda-forge tensorflow?
1

Well, conda install tensorflow worked perfect for me!

1 Comment

did you try conda install -c conda-forge tensorflow?
0

I use this method as told by one of the user: This is what I did for Installing Anaconda Python 3.6 version and Tensorflow on Window 10 64bit.And It was success!

Go to https://www.continuum.io/downloads to download Anaconda Python 3.6 version for Window 64bit. Create a conda environment named tensorflow by invoking the following command:

C:> conda create -n tensorflow Activate the conda environment by issuing the following command:

C:> activate tensorflow (tensorflow)C:> # Your prompt should change Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/enter code here download “tensorflow-1.0.1-cp36-cp36m-win_amd64.whl”. (For my case, the file will be located in “C:\Users\Joshua\Downloads” once after downloaded) Install the Tensorflow by using following command:

(tensorflow)C:>pip install C:\Users\Joshua\Downloads\ tensorflow-1.0.1-cp36-cp36m-win_amd64.whl

but nothing happens in the prompt. It starts from the new line with the tensorflow as if nothing was written. Whats the problem?

Comments

0

Try this one.

Python 3.6

pip install https://anaconda.org/intel/tensorflow/1.2.1/download/tensorflow-1.2.1-cp36-cp36m-linux_x86_64.whl

Source: https://software.intel.com/en-us/articles/intel-optimized-tensorflow-wheel-now-available

1 Comment

This is for Linux operating system, it is gonna be useful to indicate these when sharing information.
0

Uninstall Python 3.7 for Windows, and only install Python 3.6.0 then you will have no problem or receive the error message:

import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow'

Comments

0

This works for me CPU installation

pip install --upgrade tensorflow # for python 2.x

pip3 install --upgrade tensorflow # for python 3.x

Comments

-1

For Windows 10 with Anaconda 4.4 Python 3.6:

1st step) conda create -n tensorflow python=3.6

2nd step) activate tensorflow

3rd step) pip3 install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.2.1-cp36-cp36m-win_amd64.whl

5 Comments

For GPU: 3rd step) (tensorflow)C:> pip install --ignore-installed --upgrade storage.googleapis.com/tensorflow/windows/gpu/…
The third step didn't work for me. I got the following error: "... is not a supported wheel on this platform". Is it something to do with x32 and x64 versions?
If I try conda install tensorflow, I get the following error: PackageNotFoundError: Package missing in current win-32 channels: - tensorflow
for GPU, use this command: conda install -c anaconda -y tensorflow-gpu==1.8.0
why are you telling us how to activate an env? all one needs is,conda install -c conda-forge tensorflow, no?
-1

conda create -n tensorflow_gpuenv tensorflow-gpu

Or

type the command pip install c:.*.whl in command prompt (cmd).

1 Comment

why are you telling us how to activate an env? all one needs is,conda install -c conda-forge tensorflow, no?
-1

Please refer this link :

  • Go to https://www.anaconda.com/products/individual and click the “Download” -button
  • Download the Python 3.7 64-Bit (x86) Installer
  • Run the downloaded bash script (.sh) file to begin the installation. See here for more details.
  • -When prompted with the question “Do you wish the installer to prepend the Anaconda<2 or 3> install location to PATH in your /home//.bashrc ?”, answer “Yes”. If you enter “No”, you must manually add the path to Anaconda or conda will not work.

Select Windows or linked base command, In my case I have used Linux :

Create a new Anaconda virtual environment Open a new Terminal window

Type the following command: The above will create a new virtual environment with name tensorflow

conda create -n tensorflow pip python=3.8

 conda activate tensorflow

enter image description here

enter image description here

2 Comments

why are you telling us how to activate an env? all one needs is,conda install -c conda-forge tensorflow, no?
@CharlieParker if you have multiple evn you can activate and dectivate different env one next to other.
-1

I will simply leave this here because none of the other approaches worked for me. Also, I can look it up myself when I need it for new devices.

THIS IS THE WAY IT WORKS:

  1. Install Anaconda
  2. Open Anaconda Prompt
  3. conda create --name tensorflow
  4. conda activate tensorflow
  5. Search with conda search tensorflow for all available TensorFlow versions
  6. Choose the one you need (usually the newest one)
  7. Explicitly name the version now (otherwise it happened to me that version 1.14 was installed): conda install -c conda-forge tensorflow=YOUR_VERSION
  8. Open Anaconda, choose the new environment and install Spyder
  9. Install Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019
  10. Download msvcp140.dll and add the .dll-File to the Windows\System32 folder

Now it should work like a charm!

TROUBLESHOOTING:

If it still doesn't work, try this, it worked for me:

Open Anaconda-Prompt:

  1. Create an environment with Python 3.6 like this: conda create --name tensorflow_env python=3.6
  2. conda activate tensorflow
  3. Steps 6. and 6. from the list above
  4. conda install tensorflow=YOUR_VERSION(not forge, just like this!)
  5. Now do steps 8, 9, 10 from above

TENSORFLOW GPU:

If you want to use your GPU, do it the same way as described above, with the only difference to install tensorflow-gpu instead if tensorflow.

And, you must install the newest NVIDIA driver for your GPU, you can find and choose the right one here.

(Yes, in TF 2 there's both, a CPU and GPU support, in the "normal" library. However, if you install tensorflow-gpu via conda, it installs the CUDA and cudNN etc. you need automatically for you - also the right versions. This way easier and faster.)

1 Comment

why are you telling us how to activate an env? all one needs is,conda install -c conda-forge tensorflow, no?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.