Getting Error while importing keras and tensorflow

Getting Error while importing keras and tensorflow


Hi Team,

 

I am getting this error any one please respond and solve my issue asap

 

File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/u31612/.local/lib/python3.6/site-packages/tensorflow_core/__init__.py", line 42, in <module> from . _api.v2 import audio File "/home/u31612/.local/lib/python3.6/site-packages/tensorflow_core/_api/v2/audio/__init__.py", line 10, in <module> from tensorflow.python.ops.gen_audio_ops import decode_wav File "/home/u31612/.local/lib/python3.6/site-packages/tensorflow_core/python/ops/gen_audio_ops.py", line 13, in <module> from tensorflow.python.eager import execute as _execute File "/home/u31612/.local/lib/python3.6/site-packages/tensorflow_core/python/eager/execute.py", line 28, in <module> from tensorflow.python.framework import ops File "/home/u31612/.local/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 58, in <module> from tensorflow.python.platform import app File "/home/u31612/.local/lib/python3.6/site-packages/tensorflow_core/python/platform/app.py", line 23, in <module> from absl.app import run as _run ModuleNotFoundError: No module named 'absl'

4 posts / 0 new

Hi,

Thanks for reaching out to us.

Could you please confirm whether the installation of tensorflow and keras is complete without any errors?

If so please try to manually install absl module using the command below.

pip install absl-py

If still you are getting error while importing the packages, we reccomend you to create a conda environment and install necessary packages.

Please follow the below steps

Create a conda environment and install intel optimized tensorflow in that environment
 

conda create -n <env_name> -c intel python=<python_version>
source activate <env_name>
conda install tensorflow -c intel
conda install -c anaconda keras

Hope this helps. If you face any further issues please let us know.


Hi,

Could you please confirm if the issue is resolved.

Please be informed that the thread will get closed within 2 business days assuming that the solution provided was helpful


Hi,

Since we have not received a response, we are closing this thread with the assumption that the issue got resolved. Feel free to open a new thread if you face further issues. 

Leave a Comment

Please sign in to add a comment. Not a member? Join today