Earlier i was using Tensorflow GPU v2.10 (Windows 11 w/ nvidia gtx1650, cuDNN installed, Python 3.10.7) everything was working fine.
I upgraded TF to v2.14 and now i am unable to import keras and getting following error
ImportError: cannot import name “keras” from tensorflow (unknown location)
I am also getting following error while trying print(tf.__ version__)
AttributeError: module ‘tensorflow’ has no attribute ‘__ version__’
I have uninstalled TF and Keras and reinstalled it still no luck
You don’t show how your are trying to import keras.
Can you please try
from tensorflow.python import keras?
As per as getting Tensorflow version can you try the following?
import tensorflow as tf
(without any space between underscore and “v” ; website formatting is annnoying me)
I tried two ways:
- import tensorflow as tf
from tensorflow import keras
this way gave the error mentioned in my og post.
- import keras
This gave me module not found error (module tensorflow.compat)
regarding checking version, yes i tried __ version__ (without space)