Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
346 Views

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'

0 Kudos
2 Replies
Highlighted
Employee
346 Views

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.

0 Kudos
Highlighted
Employee
346 Views

Hi,

Could you please confirm if the issue is resolved.

0 Kudos