None of the modules seem to function even after I installed tensor flow. For example when I use the session module I get the error tensor flow has no module session . When importing tensor flow i get no error at all. The error comes in when I try to use one of its modules. What could be the cause of this error and how can i fix it. The intelli sense of visual studio code does not even
Recognize the keywords of tensor flow.
Asked
Active
Viewed 14 times
-1
David manga
- 43
- 3
-
1Can you add the code? it seems like you only wrote a single underscore instead of two, try this print(tf.__version__) – Itamar Cohen Jun 04 '22 at 08:51
-
There are two underscores – David manga Jun 04 '22 at 09:09
-
you might have tried to uninstall and install tensorflow. There are chances of the environment using 2 kinds of tensorflows. Try creating a new environment and start fresh it would work. – Itamar Cohen Jun 04 '22 at 10:31
-
always put code, data and full error message as text (not screenshot, not link) in question (not in comment). It will be more readable and easier to use in answer, and more people will see it - so more people can help you. – furas Jun 04 '22 at 11:01
-
you have one underscore before `version` and one underscore after `version` but it has to be two underscores before `version` and two underscores after `version` - – furas Jun 04 '22 at 11:03
-
I think I see tab with name `tensorflow.py`. Did you create file `tensorflow.py` or folder `tensorflow`? Now `import` may load your file `tensorflow.py` or folder `tensorflow` and it can't find `__version__` in your file/folder. You have to rename your file/folder. – furas Jun 04 '22 at 11:07