0

I am trying to install tensorflow for python 2.7 on Ubuntu 16. I am using pip install tensorflow-gpu and I get the following message in the terminal:

pip install tensorflow-gpu

Requirement already satisfied: tensorflow-gpu in /usr/local/lib/python3.5/dist-packages Requirement already satisfied: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow-gpu) Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from tensorflow-gpu) Requirement already satisfied: numpy>=1.11.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow-gpu) Requirement already satisfied: protobuf>=3.1.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow-gpu) Requirement already satisfied: setuptools in /usr/local/lib/python3.5/dist-packages (from protobuf>=3.1.0->tensorflow-gpu)

When I ftry to import tensorflow It says ImportError: No module named tensorflow I am guessing since it is looking in the python 2.7 packages.

Shouldn't it be looking in python 2.7 dist-packges?

5
  • Do you have a program called pip2.7 that you can run to install the package? Commented Feb 27, 2017 at 2:11
  • There is a pip in my 2.7 dist-packages Commented Feb 27, 2017 at 2:34
  • 1
    You might need to use a different command to install PIP packages for Python 2.7 (e.g. pip2.7 install tensorflow-gpu). See this answer for more suggestions. Commented Feb 27, 2017 at 2:50
  • It is no longer looking at the 3.5 dist-packages but still doesn't work Commented Feb 27, 2017 at 22:57
  • Did you try installing in a virtualenv? The tensorflow website has instructions for that, and that will be much easier to get working than messing with your system's python and pip. Commented Mar 7, 2017 at 21:57

1 Answer 1

1

I would suggest you to use anaconda and run the following command

conda install -c anaconda tensorflow-gpu

  • Anaconda will make your life easier... hope this helps This will also install the cuda toolkit and cudnn for you and you are good to go
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.