+ 1

Error When Importing tensorflow

Hi Guys,I Tried To Run A File That Has One Statement Which Is: import tensorflow But This Error Happens Occurs: Traceback (most recent call last): File "C:\Users\max\PycharmProjects\untitled\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)]) File "C:\Users\max\AppData\Local\Programs\Python\Python38-32\lib\imp.py", line 296, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named '_pywrap_tensorflow_internal' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\max\PycharmProjects\untitled\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\max\PycharmProjects\untitled\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module> _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\max\PycharmProjects\untitled\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper import _pywrap_tensorflow_internal ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "E:/Ahmad's Programs/test.py", line 1, in <module> import tensorflow.python File "C:\Users\max\PycharmProjects\untitled\venv\lib\site-packages\tensorflow\__init__.py", line 24, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\max\PycharmProjects\untitled\venv\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File "C:\Users\max\PycharmProjects\untitled\venv\lib\site-packages\tensorflow\python

14th May 2020, 9:12 PM
Ahmad Tarek
Ahmad Tarek - avatar
5 Answers
+ 2
you need to install tensorflow module before using it. you can either do it through the console(command prompt) using this command pip install tensorflow for python 2 pip3 install tensorflow for python 3 or since you use PyCharm you can install it through the virtual environement (venv) you are using following these instructions: https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html
14th May 2020, 10:09 PM
Sebastian Pacurar
Sebastian Pacurar - avatar
+ 2
Ahmad Tarek and it's still not working?
14th May 2020, 10:18 PM
Sebastian Pacurar
Sebastian Pacurar - avatar
+ 1
Sebastian Pacurar I Have Already Installed It
14th May 2020, 10:18 PM
Ahmad Tarek
Ahmad Tarek - avatar
14th May 2020, 10:19 PM
Ahmad Tarek
Ahmad Tarek - avatar