Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tensorflow installation problems

I tried installing tensorflow on my ubuntu 14.04 64bit machine:

sudo pip2 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.6.0-cp27-none-linux_x86_64.whl

for python 2.7

When I run import tensorflow as tf in the console I get error

Error importing tensorflow. Unless you are using bazel, you should not try to import tensorflow from its source directory; please exit the tensorflow source tree, and relaunch your python interpreter from there.

Google didn't provide a good answer to this, any thoughts?

like image 316
jolly Avatar asked Feb 07 '16 11:02

jolly


1 Answers

You cannot import tensorflow whilst you are in the tensorflow source directory. Change Directory i.e. cd .. first before running python.

I've emphasized the key part of your error: "Error importing tensorflow. Unless you are using bazel, you should not try to import tensorflow from its source directory; please exit the tensorflow source tree, and relaunch your python interpreter from there."

like image 109
The Puternerd Avatar answered Oct 10 '22 12:10

The Puternerd