4

I am trying to install tensorflow with cuda and cudnn on a linux machine. I do not have sudo access, so I am building from source. I followed instructions here: https://www.tensorflow.org/versions/master/get_started/os_setup.html#source

I got till the part where we get lots of output:

This tutorial iteratively calculates the major eigenvalue of a 2x2 matrix, on GPU.
The last few lines look like this.
000009/000005 lambda = 2.000000 x = [0.894427 -0.447214] y = [1.788854 -0.894427]
000006/000001 lambda = 2.000000 x = [0.894427 -0.447214] y = [1.788854 -0.894427]

But after that, when I open python and try to import tensorflow, it says there is no such module.

Thanks in advance.

1
  • Also, I do not understand why we are building only the example_trainer in this line: bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer Shouldn't we build the whole package? Commented Dec 13, 2015 at 12:31

1 Answer 1

3

You need to take a few more steps before you can import TensorFlow in a Python shell: just building //tensorflow/cc:tutorials_example_trainer does not build any of the Python front-end.

The easiest way to do this from a source installation is to follow the instructions for building a PIP package from source, and then installing it (either globally on your machine, or in a virtualenv).

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

2 Comments

The anchor in the link is dead. Here's a new one tensorflow.org/versions/master/get_started/… (comment edited)
Thanks! Fixed them in the answer.

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.