having issue importing tensorflow module in windows - python-3.x

import tensorflow
Traceback (most recent call last):
File "D:\python36\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 "D:\python36\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 "D:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "D:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "D:\python36\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 "", line 1, in
File "D:\python36\lib\site-packages\tensorflow__init__.py", line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "D:\python36\lib\site-packages\tensorflow\python__init__.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "D:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "D:\python36\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 "D:\python36\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 "D:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "D:\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "D:\python36\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'
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. Use Anaconda
Anaconda uses conda distribution index which is similar to PyPI. The TensorFlow conda build uses MKL ( Intel Math Kernel Library ). It works without AVX.
Download Anaconda as mentioned here and create a new conda enviroment as mentioned here.
Run this command:
conda install tensorflow
2. Use builds from tensorflow-windows-wheel repo.
This repo contains a number of TensorFlow pip wheel files which are build using SSE instead of AVX. SSE build run without any compilation errors. Use this file from the repo.
Hope this helps.

Related

Failed to import tensorflow

File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
from tensorflow.python.eager import context
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
from tensorflow.python import pywrap_tfe
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\deepz\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import *
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
on importing TensorFlow as tf
I am getting this error please can someone help me to solve this problem.
system HP 245 G5 and operating system windows 10 2004 version
If you have Anaconda installed I recommend you use Conda to install tensorflow into a new environment. Reason is Conda installs tensorflow and the required Cuda Toolkit and the proper version of cuDNN. Pip does not install these and you have to download them seperately, unzip and store them in directories. You also have to adjust you environment variable to point to these directories.

Python 3.8.1: ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' - Is tensorflow only supported up to 3.7?

I am using Python 3.8.1 on Windows 10 and am trying to install TensorFlow.
I have tried many methods to install it, but I keep getting the following error upon importing TensorFlow. This time, I installed it using
conda install -c conda-forge tensorflow
Here is the stack trace:
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Program Files (x86)\Python38-32\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:\Program Files (x86)\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:\Program Files (x86)\Python38-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Program Files (x86)\Python38-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Program Files (x86)\Python38-32\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 "deep_versions.py", line 6, in <module>
import keras
File "C:\Users\rapto\AppData\Roaming\Python\Python38\site-packages\keras\__init__.py", line 3, in <module>
from . import utils
File "C:\Users\rapto\AppData\Roaming\Python\Python38\site-packages\keras\utils\__init__.py", line 6, in <module>
from . import conv_utils
File "C:\Users\rapto\AppData\Roaming\Python\Python38\site-packages\keras\utils\conv_utils.py", line 9, in <module>
from .. import backend as K
File "C:\Users\rapto\AppData\Roaming\Python\Python38\site-packages\keras\backend\__init__.py", line 1, in <module>
from .load_backend import epsilon
File "C:\Users\rapto\AppData\Roaming\Python\Python38\site-packages\keras\backend\load_backend.py", line 90, in <module>
from .tensorflow_backend import *
File "C:\Users\rapto\AppData\Roaming\Python\Python38\site-packages\keras\backend\tensorflow_backend.py", line 5, in <module>
import tensorflow as tf
File "C:\Program Files (x86)\Python38-32\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Program Files (x86)\Python38-32\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Program Files (x86)\Python38-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Program Files (x86)\Python38-32\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:\Program Files (x86)\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:\Program Files (x86)\Python38-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Program Files (x86)\Python38-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Program Files (x86)\Python38-32\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'
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.
What I have done to try to fix it: I have looked at other similar questions on here but they have been for older versions of Python. I have also looked at this GitHub post but could not resolve the issue.
I checked the TensorFlow site for Python version compatability but the latest update that I could find was a few months ago, saying that TensorFlow only supports up to Python 3.7 (https://github.com/tensorflow/tensorflow/issues/33374) Is this still the case and do I need to downgrade Python in order to use TensorFlow?
Please let me know if there is any more information I should provide (I'm still learning how to correctly ask questions here). Thank you.
Edit: I created a conda environment with Python 3.7 and I did not get the same error and importing TF seems to be working fine now. It seems that Python 3.8 is still not yet supported, so this may have been the problem.
Per the installation documents, only Python 3.5-3.7 are supported. https://www.tensorflow.org/install
I think it has to do with the version of python or TensorFlow and You should change versions of either Python or Tensorflow, as these 2 versions you are using are not compatible. You could downgrade to Python3.6 or try Tensorflow>=1.13.1 which supports Python 3.7. it should work hopefully.
Well for me, i managed to fix it by creating a venv by using conda create -n <venv name> python=3.6. Important to note that the python version specified needs to be 3.6. Then, using the same command just the difference is that i used tensor-gpu instead conda install -c conda-forge tensorflow-gpu. Note that my python versio on my machine is 3.7.8, but i guess any versions from 3.5-3.8 should be fine. Hope it still helps someone in the future!

While importing tensorflow error occurred

First I installed tensorflow 2.0.0rc1 While importing tensorflow in python 3.6.9 it said import error then I tried tensorflow 1.14.0 but then also error occurred:
Traceback (most recent call last):
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\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\SUSAMA\Anaconda3\envs\tensor\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed with error code -1073741795
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/SUSAMA/PycharmProjects/tensorflow/ten.py", line 1, in <module>
import tensorflow as tf
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\lib\site-packages\tensorflow\__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\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\SUSAMA\Anaconda3\envs\tensor\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\SUSAMA\Anaconda3\envs\tensor\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed with error code -1073741795
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.
Process finished with exit code 1
Please tell how to correct it.
Installing TensorFlow (TF) CPU prebuilt binaries:
TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets.
See hardware requirements to know more.
Therefore on any CPU that does not have these instruction sets, either CPU or GPU version of TF will fail to load.
Apparently, your CPU model does not support AVX instruction sets. You can still use TensorFlow with the alternatives given below:
Try Google Colab to use TensorFlow.
The easiest way to use TF will be to switch to google colab. You get pre-installed latest stable TF version. Also you can use pip install to install any other preferred TF version.
It has an added advantage since you can you easily switch to different hardware accelerators (cpu, gpu, tpu) as per the task.
All you need is a good internet connection and you are all set.
Try to build TF from sources by changing CPU optimization flags.
For me it was that my CPU doesnt support AVX instructions, which are used by
Tensorflow > 1.5 causing this import Error. Possible Fixes are afaik:
1.)Tensorflow 1.5:
pip install tensorflow==1.5
2.)Use a prebuilt wheel without AVX intructions (For example for Windows: https://github.com/fo40225/tensorflow-windows-wheel)
3.)Build Tensorflow from Source for your system.

Error while Installing tensorflow-gpu on MX150

I am trying to install tensorflow gpu on my laptop running MX150. I updated my NVIDIA driver, installed CUDA , installed CUDnn. But still not able to import Tensorflow. getting following error
>>> import tensorflow as tf
Traceback (most recent call last):
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/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 "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/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 "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory
It looks like there is a mismatch between your python version and your CUDA version.
please check your versions by:
python --version
and
nvcc --version
What is yuor OS? What version of Tensorflow your are trying to run?
I suggest to uninstall tensorflow and reinstall it after you have the currect version of Python and CUDA. You can follow Tesnoeflow with gpu documentation.
Also check this issue which is similar to yours
libcublas.so.8.0 error with tensorflow
you need python version 3.7 with cuda toolkit 10.0
I also had the same error and solved it by setting the environmental variables for cuda path in your system advanced settings.
If you have installed two or more cuda versions make sure to delete rest from environment variables .
use the below code to check if gpu is being utilizd in jupyter notebook.
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

Failed to load the native TensorFlow runtime on Win 10 64

I'm trying to install TensorFlow as described here on my Windows 10 (x64) machine.
First I installed CUDA. My GPU (GTX 660ti, Compute Capability 3.0) is supported.
Versions: Toolkit 9.0 (accidently installed 9.1 aswell beforehand), cuDNN v7.0.5 for CUDA 9.0
Then I installed Tensorflow using native pip3. Python-Version: 3.6.4
When I'm just importing the tensorflow package I'm getting the following error:
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: A dynamic link library (dll) initialization routine failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import * # pylint: disable=redefined-builtin
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: A dynamic link library (dll) initialization routine failed
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
I have the following System environment variables set:
CUDA_PATH - C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
CUDA_PATH_V9_0 - C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
CUDA_PATH_V9_1 - C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1
Path - C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\libnvvp;
I have Microsoft Visual C++ 2015 Redistributable (x64) - 14.0.24215 installed. MSVCP140.dll is in my System32 folder.
What I also tried:
Using Python version 3.6.2 (What i currently have)
Installing via anaconda
Using pip instead of pip3
Upgrading pip3, pip
Reinstalling
Using tensorflow version from uci repository
Using alternative numpy, scipy, tensorflow versions from here, I got a slightly different stacktrace:
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 35, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 30, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (dll) initialization routine failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import * # pylint: disable=redefined-builtin
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 35, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 30, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\Max\AppData\Local\Programs\Python\Python36\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (dll) initialization routine failed
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
I would suggest trying the version from the uci repository for 64 bit Windows binaries, try removing the version you have again and then download and pip installing the version from here. Hope that helps.

Resources