Pip: need to change package name tensorflow-gpu to tensorflow
I am trying to install gpu enabled tensorflow in a conda environment
I am using the command:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.1.0-cp35-cp35m-linux_x86_64.whl
When I look at the packages installed with the conda list, I end up with a package named tensorflow-gpu.
You can't even import this package because it has a '-' in it.
How do I change the name to "tensorflow"?
Edit: I now think there must be something else in this. Why this serious package in the deep learning community has this obvious problem. Hopefully a tensorflow expert can answer. I am following instructions for Ubuntu and Anaconda here: https://www.tensorflow.org/install/install_linux
source to share
I had a similar problem that was pretty frustrating. I started with a newly created .whl file and tried to install.
pip install /home/ubuntu/xfer/tensorflow_gpu-1.2.1-cp27-none-linux_x86_64.whl
Command line check:
pip show tensorflow
no package called tensorflow
pip show tensorflow-gpu
but there is tensorflow-gpu package in version 1.2.1
However, single line execution in python failed despite assurances that conda would replace:
import tensorflow as tf
Then I repeated the pip installation in 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 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 , then a slightly longer program will run, which will also be successful:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
source to share