tensorflow: Installation of Tensorflow 0.8 in an Anaconda Python 3.5 Environment Failed

Dear friends,

I have tried to install tensorflow 0.8 in an anaconda python 3.5 environment but it didn’t worked. I got a message saying something like “not a supported wheel on this platform”.

Environment info

Operating System: Ubuntu 14.04.LTS

Steps to reproduce

dlm@pc-aero-01:~$ 
dlm@pc-aero-01:~$ conda create -n tensorflow python=3.5
(...)
dlm@pc-aero-01:~$ 
dlm@pc-aero-01:~$ source activate tensorflow
discarding /home/dlm/anaconda3/bin from PATH
prepending /home/dlm/anaconda3/envs/tensorflow/bin to PATH
(tensorflow)dlm@pc-aero-01:~$ 
(tensorflow)dlm@pc-aero-01:~$ python -V
Python 3.5.1 :: Continuum Analytics, Inc.
(tensorflow)dlm@pc-aero-01:~$ pip -V
pip 8.1.1 from /home/dlm/anaconda3/envs/tensorflow/lib/python3.5/site-packages (python 3.5)
(tensorflow)dlm@pc-aero-01:~$ 
(tensorflow)dlm@pc-aero-01:~$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl
**tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl is not a supported wheel on this platform.**
(tensorflow)dlm@pc-aero-01:~$ 

What have you tried?

I have tried to use the pip3 for python 3.4 instead of 3.5. It appears to install but didn’t worked after all. I think the the problem now is that conda is using the pip of the system environment since this version isn’t installed in the tensorflow environment. See below:

(tensorflow)dlm@pc-aero-01:~$ 
(tensorflow)dlm@pc-aero-01:~$ pip3 -V
pip 8.1.1 from /usr/local/lib/python3.4/dist-packages (python 3.4)
(tensorflow)dlm@pc-aero-01:~$ 
(tensorflow)dlm@pc-aero-01:~$ sudo -H pip3 install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl
[sudo] password for dlm: 
Collecting tensorflow==0.8.0rc0 from https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl
  Using cached https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl
Collecting numpy>=1.8.2 (from tensorflow==0.8.0rc0)
  Using cached numpy-1.11.0-cp34-cp34m-manylinux1_x86_64.whl
Collecting wheel>=0.26 (from tensorflow==0.8.0rc0)
  Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting six>=1.10.0 (from tensorflow==0.8.0rc0)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting protobuf==3.0.0b2 (from tensorflow==0.8.0rc0)
  Using cached protobuf-3.0.0b2-py2.py3-none-any.whl
Collecting setuptools (from protobuf==3.0.0b2->tensorflow==0.8.0rc0)
  Using cached setuptools-20.9.0-py2.py3-none-any.whl
Installing collected packages: numpy, wheel, six, setuptools, protobuf, tensorflow
Successfully installed numpy-1.11.0 protobuf-3.0.0b2 setuptools-20.9.0 six-1.10.0 tensorflow-0.8.0rc0 wheel-0.29.0
(tensorflow)dlm@pc-aero-01:~$ 
(tensorflow)dlm@pc-aero-01:~$ python
Python 3.5.1 |Continuum Analytics, Inc.| (default, Dec  7 2015, 11:16:01) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import sys
>>> sys.path
['', '/home/dlm/anaconda3/envs/tensorflow/lib/python35.zip', '/home/dlm/anaconda3/envs/tensorflow/lib/python3.5', '/home/dlm/anaconda3/envs/tensorflow/lib/python3.5/plat-linux', '/home/dlm/anaconda3/envs/tensorflow/lib/python3.5/lib-dynload', '/home/dlm/anaconda3/envs/tensorflow/lib/python3.5/site-packages', '/home/dlm/anaconda3/envs/tensorflow/lib/python3.5/site-packages/setuptools-20.7.0-py3.5.egg']
>>> 
>>> import tensorflow
>>> 
(tensorflow)dlm@pc-aero-01:~$ 
(tensorflow)dlm@pc-aero-01:~$ python -c 'import os; import inspect; import tensorflow; print(os.path.dirname(inspect.getfile(tensorflow)))'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/dlm/anaconda3/envs/tensorflow/lib/python3.5/inspect.py", line 607, in getfile
    raise TypeError('{!r} is a built-in module'.format(object))
TypeError: <module 'tensorflow' (namespace)> is a built-in module
(tensorflow)dlm@pc-aero-01:~$ python3 -c 'import os; import inspect; import tensorflow; print(os.path.dirname(inspect.getfile(tensorflow)))'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/dlm/anaconda3/envs/tensorflow/lib/python3.5/inspect.py", line 607, in getfile
    raise TypeError('{!r} is a built-in module'.format(object))
TypeError: <module 'tensorflow' (namespace)> is a built-in module
(tensorflow)dlm@pc-aero-01:~$ 
(tensorflow)dlm@pc-aero-01:~$ python -m tensorflow.models.image.mnist.convolutional
/home/dlm/anaconda3/envs/tensorflow/bin/python: Error while finding spec for 'tensorflow.models.image.mnist.convolutional' (<class 'ImportError'>: No module named 'tensorflow.models')
(tensorflow)dlm@pc-aero-01:~$ 
(tensorflow)dlm@pc-aero-01:~$ python -c "import tensorflow; print(tensorflow.__version__)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute '__version__'
(tensorflow)dlm@pc-aero-01:~$ 

But, if you try to create a conda environment using python 3.4 it works. Therefore, one possible way to fix it is change the installation procedure in order to create a conda environment using python 3.4 and not python 3.5.

dlm@pc-aero-01:~$ conda create -n tensorflowX python=3.4
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ....
Solving package specifications: .........
(...)
dlm@pc-aero-01:~$ source activate tensorflowX
discarding /home/dlm/anaconda3/bin from PATH
prepending /home/dlm/anaconda3/envs/tensorflowX/bin to PATH
(tensorflowX)dlm@pc-aero-01:~$ 
(tensorflowX)dlm@pc-aero-01:~$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl
Collecting tensorflow==0.8.0rc0 from https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl
(...)
Successfully installed numpy-1.11.0 protobuf-3.0.0b2 setuptools-20.7.0 six-1.10.0 tensorflow-0.8.0rc0 wheel-0.29.0
(tensorflowX)dlm@pc-aero-01:~$ python -m tensorflow.models.image.mnist.convolutional
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:900] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties: 
name: GeForce GTX 980 Ti
major: 5 minor: 2 memoryClockRate (GHz) 1.19
pciBusID 0000:01:00.0
Total memory: 6.00GiB
Free memory: 5.46GiB
I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0 
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0:   Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:755] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 980 Ti, pci bus id: 0000:01:00.0)
Initialized!
Step 0 (epoch 0.00), 18.8 ms
Minibatch loss: 12.054, learning rate: 0.010000
Minibatch error: 90.6%
Validation error: 84.6%
Step 100 (epoch 0.12), 6.0 ms
Minibatch loss: 3.281, learning rate: 0.010000
Minibatch error: 6.2%
Validation error: 6.9%
Step 200 (epoch 0.23), 5.7 ms

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

The pip wheel contains the python version in its name (cp34-cp34m). If you download the whl file and rename it to say py3-none instead, it should work. Can you try that?

Renaming the wheel file worked fine for me!

You can rename the wheel file as pointed out in the installation docs. Sorry for the inconvenience.

It worked fine.

dlm@pc-aero-01:~$ 
dlm@pc-aero-01:~$ conda create -n tensorflow3 python=3.5
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ....
Solving package specifications: .........
Package plan for installation in environment /home/dlm/anaconda3/envs/tensorflow3:
(...)
dlm@pc-aero-01:~$ 
dlm@pc-aero-01:~$ wget https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl
(...)
dlm@pc-aero-01:~$ 
dlm@pc-aero-01:~$ mv tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl tensorflow-0.8.0rc0-py3-none-linux_x86_64.whl
dlm@pc-aero-01:~$ 
dlm@pc-aero-01:~$ source activate tensorflow3
discarding /home/dlm/anaconda3/bin from PATH
prepending /home/dlm/anaconda3/envs/tensorflow3/bin to PATH
(tensorflow3)dlm@pc-aero-01:~$ 
(tensorflow3)dlm@pc-aero-01:~$ pip install --ignore-installed --upgrade tensorflow-0.8.0rc0-py3-none-linux_x86_64.whl
Processing ./tensorflow-0.8.0rc0-py3-none-linux_x86_64.whl
Collecting numpy>=1.8.2 (from tensorflow==0.8.0rc0)
(...)
(tensorflow3)dlm@pc-aero-01:~$ 
(tensorflow3)dlm@pc-aero-01:~$ python -V
Python 3.5.1 :: Continuum Analytics, Inc.
(tensorflow3)dlm@pc-aero-01:~$ 
(tensorflow3)dlm@pc-aero-01:~$ python
Python 3.5.1 |Continuum Analytics, Inc.| (default, Dec  7 2015, 11:16:01) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import tensorflow
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally
>>> 
(tensorflow3)dlm@pc-aero-01:~$ 
(tensorflow3)dlm@pc-aero-01:~$ python -m tensorflow.models.image.mnist.convolutional
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:900] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties: 
name: GeForce GTX 980 Ti
major: 5 minor: 2 memoryClockRate (GHz) 1.19
pciBusID 0000:01:00.0
Total memory: 6.00GiB
Free memory: 5.63GiB
I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0 
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0:   Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:755] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 980 Ti, pci bus id: 0000:01:00.0)
Initialized!
Step 0 (epoch 0.00), 18.1 ms
Minibatch loss: 12.054, learning rate: 0.010000
Minibatch error: 90.6%
Validation error: 84.6%
Step 100 (epoch 0.12), 5.9 ms
Minibatch loss: 3.284, learning rate: 0.010000
Minibatch error: 6.2%
Validation error: 7.1%
(...)
(tensorflow3)dlm@pc-aero-01:~$ 

With PR #2585, we now have Linux Python 3.5 whl files built and tested nightly. The links to the whl files and build history can be found in the main README.md: https://github.com/tensorflow/tensorflow/

There is currently no way to install TensorFlow from a binary package for Windows.

On Wed, May 11, 2016 at 10:53 PM stationedabroad notifications@github.com wrote:

thanks for reply. I meant I am using anaconda on windows - i followed all advice above, saving the fie locally even - but thought since the set up files have ‘linux’ in the name they would not work regardless. So is there no way to install tensorflow on windows through anaconda? the message i get when trying the above when using pip and the copied file as tensorflow-0.8.0rc0-py3-none-linux_x86_64.whl is:

“tensorflow-0.8.0rc0-py3-none-linux_x86_64.whl is not a supported wheel on this platform.”

— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/tensorflow/tensorflow/issues/1990#issuecomment-218666518

Ah, thank you. I did indeed not understand properly. Can you take a look at #2032, would that fix the problem (at least temporarily, until we have whl files for 3.5)?