Skip to content Skip to sidebar Skip to footer

Pip: Need To Change Name Of Package Tensorflow-gpu To Tensorflow

I'm trying to install tensorflow with gpu support into a conda environment I use the command: pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/lin

Solution 1:

When you install the tensorflow gpu version, Anaconda will show that you have installed tensorflow-gpu. The -gpu just indicates that it is a gpu version and is not a part of the name. You can still just import tensorflow and the gpu version will be found.


Solution 2:

I had a similar problem which was quite frustrating. I started with recently built .whl file and tried to install.

pip install /home/ubuntu/xfer/tensorflow_gpu-1.2.1-cp27-none-linux_x86_64.whl

Command line testing:

pip show tensorflow

no package called tensorflow

pip show tensorflow-gpu

but there is a package tensorflow-gpu at version 1.2.1

However, running one line in python failed despite assurances that conda would substitute:

import tensorflow as tf

I then repeated the pip install of the .whl file with the --upgrade option:

pip install --upgrade /home/ubuntu/xfer/tensorflow_gpu-1.2.1-cp27-none-linux_x86_64.whl

And then the one line of python succeeded:

import tensorflow as tf

And in fact based on https://www.tensorflow.org/install/install_linux#run_a_short_tensorflow_program, one would then run a slightly longer program which also succeeds:

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

Post a Comment for "Pip: Need To Change Name Of Package Tensorflow-gpu To Tensorflow"