So, I have written python ML code with many packages, some of which are tensorflow, keras and stuff like this. The code didn't have any problem, it was running, until 2 days ago the interpreter displayed this error:
ImportError: cannot import name 'convert_kernel' from partially initialized module 'keras.utils.conv_utils' (most likely due to a circular import) (/home/UbuntuUser/.local/lib/python3.8/site-packages/keras/utils/conv_utils.py)
I am trying since yesterday to fix it. I found this suggested solution: AttributeError: keras.backend ,no attribute 'eager' but it does not make any difference. Still the same error. I updated tensorflow to 2.2 -> nothing, I installed previous Keras edition prior to 2.2.5 as I figured out from the above link + tensorflow 2.0 -> nothing...
This also, didn't work for me: ImportError: cannot import name 'convert_kernel'
I have no idea how to fix it. I am searching google, github, stackoverflow links to find a solution however without any success. What I cannot understand is how this can happen, I mean how did I get this error, since my program was running without any problems and I haven't done any updates recently.
I also changed keras
to tensorflow.keras
command (as this post suggests: How to fix ' module 'keras.backend.tensorflow_backend' has no attribute '_is_tf_1'') and I got something similar:
ImportError: cannot import name 'constant' from partially initialized module 'tensorflow.python.framework.constant_op' (most likely due to a circular import) (/home/UbuntuUser/.local/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py)
I also changed filename, as this post suggests: ImportError: cannot import name '...' from partially initialized module '...' (most likely due to a circular import) without anything improved. Similar error.
I am using the latest Kubuntu 20.04.2 LTS OS. Has anyone faced something similar and how he fixed it??