0
votes

I am getting an error while I am trying to import tensorflow.

THIS IS MY ERROR MESSAGE

import tensorflow as tf Traceback (most recent call last): File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "//anaconda2/envs/tensorflow/lib/python3.6/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "//anaconda2/envs/tensorflow/lib/python3.6/imp.py", line 343, in load_dynamic return _load(spec) ImportError: dlopen(//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/_pywrap_tensorflow_internal.so, 6): Symbol not found: _SecKeyCopyExternalRepresentation Referenced from: /anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/../libtensorflow_framework.2.dylib Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security in /anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/../libtensorflow_framework.2.dylib

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 1, in File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow/init.py", line 98, in from tensorflow_core import * File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/init.py", line 40, in from tensorflow.python.tools import module_util as _module_util File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow/init.py", line 50, in getattr module = self._load() File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow/init.py", line 44, in _load module = _importlib.import_module(self.name) File "//anaconda2/envs/tensorflow/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/init.py", line 49, in from tensorflow.python import pywrap_tensorflow File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "//anaconda2/envs/tensorflow/lib/python3.6/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "//anaconda2/envs/tensorflow/lib/python3.6/imp.py", line 343, in load_dynamic return _load(spec) ImportError: dlopen(//anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/_pywrap_tensorflow_internal.so, 6): Symbol not found: _SecKeyCopyExternalRepresentation Referenced from: /anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/../libtensorflow_framework.2.dylib Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security in /anaconda2/envs/tensorflow/lib/python3.6/site-packages/tensorflow_core/python/../libtensorflow_framework.2.dylib

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.

1

1 Answers

0
votes

Where are you trying to importing TensorFlow? Is it inside a conda environment? how did you installed it? Which version of python/conda are you using? Which version of TensorFlow? Add some info to your question, that should help in solving your problem.