Import tensorflow as TF causes the below error:
RuntimeError Traceback (most recent call last) RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
ImportError Traceback (most recent call last) ImportError: numpy.core.multiarray failed to import
The above exception was the direct cause of the following exception:
SystemError Traceback (most recent call last) SystemError: <built-in method contains of dict object at 0x7ff2b2ede300> returned a result with an error set
The above exception was the direct cause of the following exception:
ImportError Traceback (most recent call last) in 1 #Our LSTM Model 2 ----> 3 import tensorflow as tf
~/opt/anaconda3/lib/python3.8/site-packages/tensorflow/init.py in 35 import typing as _typing 36 ---> 37 from tensorflow.python.tools import module_util as _module_util 38 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader 39
~/opt/anaconda3/lib/python3.8/site-packages/tensorflow/python/init.py in 35 36 from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow ---> 37 from tensorflow.python.eager import context 38 39 # pylint: enable=wildcard-import
~/opt/anaconda3/lib/python3.8/site-packages/tensorflow/python/eager/context.py in 32 from tensorflow.python import pywrap_tfe 33 from tensorflow.python import tf2 ---> 34 from tensorflow.python.client import pywrap_tf_session 35 from tensorflow.python.eager import executor 36 from tensorflow.python.eager import monitoring
~/opt/anaconda3/lib/python3.8/site-packages/tensorflow/python/client/pywrap_tf_session.py in 17 # pylint: disable=invalid-import-order,g-bad-import-order, wildcard-import, unused-import 18 from tensorflow.python import pywrap_tensorflow ---> 19 from tensorflow.python.client._pywrap_tf_session import * 20 from tensorflow.python.client._pywrap_tf_session import _TF_SetTarget 21 from tensorflow.python.client._pywrap_tf_session import _TF_SetConfig
ImportError: initialization failed