I installed TensorFlow on my system following the instructions on https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#download-and-setup and tried both the pip installation and anaconda installation. I tried running a few examples but none of them worked.
>>> import tensorflow
>>> tensorflow.InteractiveSession()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'InteractiveSession'
>>> a = tensorflow.zeros((2,2))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'zeros'
I get the same error for many other functions. I have installed TensorFlow 0.8 with GPU support, Python 3.5.1 and Ubuntu 15.10 64bit. I remember things worked well before I installed Anaconda(3), which I did to get Numpy and Scipy. I also kind of messed with the python paths afterwards. Now when I try to reinstall TensorFlow, using
sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl
tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl is not a supported wheel on this platform.
To reset the python on my system, I even reinstalled Ubuntu but it did not help much. What should be done to get things working?
print dir(tensorflow)in the Python shell? I suspect Python is picking up a different file or directory from your path - e.g. do you have a file calledtensorflow.pyin the current directory? - mrry