<p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>
<p dir="auto">OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MAC Yosemite 10.10.5 (14F27)</p>
</li>
<li>
<p dir="auto">TensorFlow installed from (source or binary):source</p>
</li>
<li>
<p dir="auto">TensorFlow version: 1.13.1</p>
</li>
<li>
<p dir="auto">Python version: Python 3.6.8 :: Anaconda, Inc.</p>
</li>
<li>
<p dir="auto">Installed using virtualenv? pip? conda?: pip</p>
</li>
<li>
<p dir="auto">GCC/Compiler version (if compiling from source):</p>
</li>
<li>
<p dir="auto">CUDA/cuDNN version:</p>
</li>
<li>
<p dir="auto">GPU model and memory: 4 GB 1600 MHz DDR3</p>
</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong></p>
<p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong></p>
<p dir="auto"><strong>Any other info / logs</strong><br>
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.<br>
Although tensorflow is installed and pip install tensorflow shows that it is already satisfied, but I cannot import tensorflow library</p>
<p dir="auto">File "/Users/botaduisenbay/Desktop/tester.py", line 9, in <br>
import tensorflow as tf</p>
<p dir="auto">File "/Users/botaduisenbay/anaconda3/lib/python3.6/site-packages/tensorflow/<strong>init</strong>.py", line 24, in <br>
from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import</p>
<p dir="auto">File "/Users/botaduisenbay/anaconda3/lib/python3.6/site-packages/tensorflow/python/<strong>init</strong>.py", line 49, in <br>
from tensorflow.python import pywrap_tensorflow</p>
<p dir="auto">File "/Users/botaduisenbay/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <br>
raise ImportError(msg)</p>
<p dir="auto">ImportError: Traceback (most recent call last):<br>
File "/Users/botaduisenbay/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "/Users/botaduisenbay/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "/Users/botaduisenbay/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
File "/Users/botaduisenbay/anaconda3/lib/python3.6/imp.py", line 243, in load_module<br>
return load_dynamic(name, filename, file)<br>
File "/Users/botaduisenbay/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic<br>
return _load(spec)<br>
ImportError: dlopen(/Users/botaduisenbay/anaconda3/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 6): no suitable image found.  Did find:<br>
/Users/botaduisenbay/anaconda3/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: truncated mach-o error: segment __LINKEDIT extends to 365926664 which is past end of file 154042368</p>
<p dir="auto">Failed to load the native TensorFlow runtime.</p>
<p dir="auto">See <a href="https://www.tensorflow.org/install/errors" rel="nofollow">https://www.tensorflow.org/install/errors</a></p>
<p dir="auto">for some common reasons and solutions.  Include the entire stack trace<br>
above this error message when asking for help.</p>
<p dir="auto"><em>Please make sure that this is a bug. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution Windows 10 64 bit</li>
<li>TensorFlow installed from (source or binary): pip install tensorflow</li>
<li>TensorFlow version: 1.12.0</li>
<li>Python version:3.6.5</li>
<li>GPU model and memory: Geforce 150mx 4gb</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong><br>
I'm unable to import keras using <em>"Tensorflow backend"</em><br>
when I try to import <em>"from keras.models import Sequential"</em>  I get the error shown bellow</p>
<p dir="auto"><strong>These are the steps that I did when I installed the libraries</strong><br>
1- conda create -n tensorflow python=3.5 anaconda.</p>
<p dir="auto">2- activate tensorflow.</p>
<p dir="auto">3- conda install theano.</p>
<p dir="auto">4- conda install mingw libpython.</p>
<p dir="auto">5-pip install tensorflow.</p>
<p dir="auto">6- pip install keras.</p>
<p dir="auto">7- conda update --all</p>
<p dir="auto">8-  pip install tensorflow-gpu</p>
<p dir="auto"><strong>Other info / logs</strong><br>
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.</p>
<p dir="auto">Error shown:</p>
<p dir="auto">`from keras.models import Sequential<br>
Using TensorFlow backend.<br>
Traceback (most recent call last):</p>
<p dir="auto">File "", line 1, in <br>
from keras.models import Sequential</p>
<p dir="auto">File "C:\Users\MHD\Anaconda3\lib\site-packages\keras_<em>init</em>_.py", line 3, in <br>
from . import utils</p>
<p dir="auto">File "C:\Users\MHD\Anaconda3\lib\site-packages\keras\utils_<em>init</em>_.py", line 6, in <br>
from . import conv_utils</p>
<p dir="auto">File "C:\Users\MHD\Anaconda3\lib\site-packages\keras\utils\conv_utils.py", line 9, in <br>
from .. import backend as K</p>
<p dir="auto">File "C:\Users\MHD\Anaconda3\lib\site-packages\keras\backend_<em>init</em>_.py", line 89, in <br>
from .tensorflow_backend import *</p>
<p dir="auto">File "C:\Users\MHD\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in <br>
import tensorflow as tf</p>
<p dir="auto">File "C:\Users\MHD\Anaconda3\lib\site-packages\tensorflow_<em>init</em>_.py", line 24, in <br>
from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import</p>
<p dir="auto">File "C:\Users\MHD\Anaconda3\lib\site-packages\tensorflow\python_<em>init</em>_.py", line 49, in <br>
from tensorflow.python import pywrap_tensorflow</p>
<p dir="auto">File "C:\Users\MHD\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <br>
raise ImportError(msg)</p>
<p dir="auto">ImportError: Traceback (most recent call last):<br>
File "C:\Users\MHD\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "C:\Users\MHD\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "C:\Users\MHD\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
File "C:\Users\MHD\Anaconda3\lib\imp.py", line 243, in load_module<br>
return load_dynamic(name, filename, file)<br>
File "C:\Users\MHD\Anaconda3\lib\imp.py", line 343, in load_dynamic<br>
return _load(spec)<br>
ImportError: DLL load failed: The specified module could not be found.</p>
<p dir="auto">Failed to load the native TensorFlow runtime.</p>
<p dir="auto">See <a href="https://www.tensorflow.org/install/errors" rel="nofollow">https://www.tensorflow.org/install/errors</a></p>
<p dir="auto">for some common reasons and solutions.  Include the entire stack trace<br>
above this error message when asking for help.`</p>