0

problem in tensorflow - ImportError: Traceback (most recent call last): File "C:\Users\SUBHAM KUMAR\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\SUBHAM KUMAR\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\SUBHAM KUMAR\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\SUBHAM KUMAR\AppData\Local\Programs\Python\Python38\lib\imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "C:\Users\SUBHAM KUMAR\AppData\Local\Programs\Python\Python38\lib\imp.py", line 342, in load_dynamic return _load(spec) ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.

1 Answers1

0

You need to have a 64 bit Python if you are using 32 bit. On Windows you need to have Microsoft Visual C++ 2015-2019 Redistributable (x64). If your issue is not resolved other possible reasons are mentioned here.

Note: Python binary is installed from official sources not from Windows marketplace.

Workaround for the above issue, you can create virtual environment on anaconda and install tensorflow as shown below

# Create virtual environment
conda create --name TF_VE

# When conda asks you to proceed, type y:
proceed ([y]/n)?

# Activate virtual environment
conda activate TF_VE

# Install the TF Version 
conda install tensorflow