i tried import keras but it says:
import keras Using TensorFlow backend. Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/keras/init.py", line 3, in from . import utils File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/keras/utils/init.py", line 6, in from . import conv_utils File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/keras/utils/conv_utils.py", line 9, in from .. import backend as K File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/keras/backend/init.py", line 89, in from .tensorflow_backend import * File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/keras/backend/tensorflow_backend.py", line 5, in import tensorflow as tf File "/Users/elanchezhian/tensorflow.py", line 2, in from tensorflow.examples.tutorials.mnist import input_data ModuleNotFoundError: No module named 'tensorflow.examples'; 'tensorflow' is not a package
i am using mac os high sierra and i am running keras in python3 and i installed keras with pip
edit: ok ,i already had a file named tensorflow.py ,i removed it and new error came
Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/init.py", line 3, in from . import utils File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/utils/init.py", line 6, in from . import conv_utils File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/utils/conv_utils.py", line 9, in from .. import backend as K File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/backend/init.py", line 89, in from .tensorflow_backend import * File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 5, in import tensorflow as tf ImportError: bad magic number in 'tensorflow': b'\x03\xf3\r\n'
edit: i have removed tensorflow.pyc now this error came :
RuntimeError: module compiled against API version 0xc but this version
of
numpy is 0xb
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core.umath failed to import
ImportError: numpy.core.umath failed to import
2018-10-21 10:53:26.723451: F
tensorflow/python/lib/core/bfloat16.cc:675]
Check failed: PyBfloat16_Type.tp_base != nullptr
Abort trap: 6
pip install tensorflow
if you didn't already, because keras use it as backend – xyz