Hi,
I installed python 2.7 and keras.
Then having found out about spyder I installed anaconda.
When I first run a file with a keras module, I get this error
ImportError: No module named keras.layers
So I added /usr/local/lib/python2.7/dist-packages to PYTHONPATH, and restart.
Then when I first run the command I get this error,
from keras.layers import Input, Dense
Using TensorFlow backend.
Traceback (most recent call last):
File "<ipython-input-1-b5da44e251a5>", line 1, in <module>
from keras.layers import Input, Dense
File "/usr/local/lib/python2.7/dist-packages/keras/__init__.py", line 2, in <module>
from . import backend
File "/usr/local/lib/python2.7/dist-packages/keras/backend/__init__.py", line 60, in <module>
from .tensorflow_backend import *
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 1, in <module>
import tensorflow as tf
File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 58, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 52, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/core/framework/graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
ImportError: No module named google.protobuf
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.
If I run it again I get this error,
from keras.layers import Input, Dense
Using TensorFlow backend.
Traceback (most recent call last):
File "<ipython-input-3-b5da44e251a5>", line 1, in <module>
from keras.layers import Input, Dense
File "/usr/local/lib/python2.7/dist-packages/keras/__init__.py", line 2, in <module>
from . import backend
File "/usr/local/lib/python2.7/dist-packages/keras/backend/__init__.py", line 60, in <module>
from .tensorflow_backend import *
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 1, in <module>
import tensorflow as tf
File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
ImportError: cannot import name pywrap_tensorflow
Any idea what is going wrong?
Regards,
Rupert