Image here The first block ran without any errors. but second says name error tf not defined even though i have imported tensorflow as tf.
Asked
Active
Viewed 1,019 times
3 Answers
2
Yes, simply
import tensorflow as tf
print(tf.__version__)
Additionally, check this is installed.

Gary Hutson
- 66
- 3
-
I did exactly the same . you can see it in the image that i have attached. the problem remains. – tikendraw Oct 14 '21 at 15:39
1
Open the CMD in the administrator mode and install the libraries using pip install
pip show to check the path where it is installed.
Import the path using the following code:
import sys
sys.path.append('c:/users/admin/appdata/roaming/python/python39/site-packages') sys.path.append('c:/python/python39/lib/site-packages')
The path will vary as in step 2.

Najmuddin Siddique
- 15
- 3
0
I would suggest rolling tensorflow back to a previous stable version, in this case. It might be a bug with the current version.

Gary Hutson
- 66
- 3