1

So for some assignment about 3 weeks ago, I managed to run import keras perfectly without any issues. Come today, without having done any changes or modifications I run it but was met with

ImportError: dlopen(/Users//opt/anaconda3/lib/python3.8/site-packages/tensorflow/python/_pywrap_tfe.so, 0x0002): Library not loaded: @rpath/_pywrap_tensorflow_internal.soReferenced from: /Users//opt/anaconda3/lib/python3.8/site-packages/tensorflow/python/_pywrap_tfe.so Reason: tried: '/Users//opt/anaconda3/lib/python3.8/site-packages/tensorflow/python/../../_solib_darwin_x86_64/_U_S_Stensorflow_Spython_C_Upywrap_Utfe.so___Utensorflow/_pywrap_tensorflow_internal.so' (no such file),

With a longer string that continues on stating (no such file). I've tried the remedies on (ImportError: No module named 'keras') but to no avail. They show up in anaconda packages and the exact same step just 3 weeks ago ran fine but now it's stopped running. Does anyone know why?

I'm on TensorFlow - 2.8.0

h21
  • 67
  • 6
  • Can you please share the standalone code to replicate above issue? Did you upgraded Keras/Tensorflow version recently? Are you able to run `import tensorflow as tf`?Thanks! –  Mar 09 '22 at 07:40

1 Answers1

0

You can try accessing Keras using the below line of code:

from tensorflow import keras
  • I get a message that reads, "ImportError: cannot import name '_pywrap_tf2' from 'tensorflow.python.platform'" – user2813606 Jan 05 '23 at 21:53
  • Please provide some details like which OS, Platform and python, tensorflow version you are using? And , What are the steps have you followed to install tensorflow? –  Jan 06 '23 at 04:56
  • Nevermind - I just added Tensorflow and Keras via Anaconda to my base environment – user2813606 Jan 08 '23 at 18:21