Installing Tensorflow with Python - python

I am working on Python and wanted to install Tensorflow to play with some machine learning stuff. I followed the steps in this link https://www.tensorflow.org/install/install_windows. However I got the error during import when I run the validate program.
I am not sure what happened, thank you for your help.
ErrorDuringImport: problem in tensorflow - ImportError: Traceback (most recent call last): File "D:\Work\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper return importlib.import_module(mname) File "D:\Work\Python36\lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 658, in _load_unlocked File "", line 571, in module_from_spec File "", line 922, in create_module File "", line 219, in _call_with_frames_removed ImportError: DLL load failed: The specified module could not be found. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\Work\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in from tensorflow.python.pywrap_tensorflow_internal import * File "D:\Work\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in _pywrap_tensorflow_internal = swig_import_helper() File "D:\Work\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper return importlib.import_module('_pywrap_tensorflow_internal') File "D:\Work\Python36\lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' 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.
pip list

Related

Unable to use keras - ImportError: No module named '_pywrap_tensorflow_internal'

I am trying to execute the command
python -c "from keras import backend".
But while executing it I am getting the following error.
(aind-cv) C:\Users\Harikesh>python -c "from keras import backend"
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 985, in _gcd_import
File "", line 968, in _find_and_load
File "", line 957, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 577, in module_from_spec
File "", line 938, in create_module
File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: 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 "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\keras\__init__.py", line 3, in
from . import utils
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\keras\utils\__init__.py", line 6, in
from . import conv_utils
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\keras\utils\conv_utils.py", line 9, in
from .. import backend as K
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\keras\backend\__init__.py", line 84, in
from .tensorflow_backend import *
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in
import tensorflow as tf
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\__init__.py", line 24, in
from tensorflow.python import *
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\__init__.py", line 51, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 985, in _gcd_import
File "", line 968, in _find_and_load
File "", line 957, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 577, in module_from_spec
File "", line 938, in create_module
File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\Harikesh\Anaconda3\envs\aind-cv\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
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 am using Anaconda and referred that website to solve the problem but it is not solved. I am trying to do the tasks provided in this. My tensorflow codes are working fine but I am unable to use keras only.
As I cannot comment I am writing this as an answer.
Make sure you have the lib MSVCP140.DLL. You can check in system->path variable. If not you can download it from here link. Also make sure you download the correct 32/64 bit for your system.
Also possible duplicate of this

ImportError: No module named '_pywrap_tensorflow_internal'

I've just installed tensorflow but when typing :
import tensorflow
I get this error :
Traceback (most recent call last):
File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 914, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Une routine d\u2019initialisation d\u2019une bibliothèque de liens dynamiques (DLL) a échoué.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python35\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Program Files\Python35\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\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 914, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Une routine d\u2019initialisation d\u2019une bibliothèque de liens dynamiques (DLL) a échoué.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
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 install tensorflow like this :
pip3 install tensorflow
I use python 3.5.3, with Windows 10 Pro.
I re-install several times tensorflow but I can't solve this issue.
I know that this problem has been solved many times but not with CPU-only tensorflow. That's why I asked you this question.
How can I do that.
Thanks in advance for your response.
EDIT : I found that tensorflow is trying to import _pywrap_tensorflow_internal as a module but in fact it's a *.pyd
I encountered the same issue and the problem was with the version of TensorFlow. Follow the below steps in order to remedy this situation:
Open the terminal via Anaconda navigator.
Run the command:
conda install tensorflow
Try importing tensorflow again and it will just work fine.

Problems Installing Tensor Flow Windows 10

I'm trying to get tensorflow to work on my Windows 10 machine.
I have Cude 8 and CuDNN 5.1 installed and added to the %path%.
Installed Python 3.5.4 then proceeded to install TensorFlow by executing
pip3 install --upgrade tensorflow-GPU. The computer is running a GeForce 1060.
Here is what I get when I try to import TensorFlow:
import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in >swig_import_helper
return importlib.import_module(mname)
File >"C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\importlib__init__.p>y", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 985, in _gcd_import
File "", line 968, in _find_and_load
File "", line 957, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 577, in module_from_spec
File "", line 938, in create_module
File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred below:
Traceback (most recent call last):
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python\pywrap_tensorflow.py", line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in >swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File >"C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\importlib__init__.p>y", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: 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 "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow__init__.py", line 24, in
from tensorflow.python import *
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python__init__.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python\pywrap_tensorflow.py", line 52, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in >swig_import_helper
return importlib.import_module(mname)
File >"C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\importlib__init__.p>y", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 985, in _gcd_import
File "", line 968, in _find_and_load
File "", line 957, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 577, in module_from_spec
File "", line 938, in create_module
File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python\pywrap_tensorflow.py", line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\site->packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in >swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File >"C:\Users\morit\AppData\Local\Programs\Python\Python35\lib\importlib__init__.p>y", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
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've faced this error during my setup. But my environment is Windows 7.
Uninstalled the Python and reinstalled python 3.5 and continued the setup.
Next followed this link to resolve the DLL load failed error:
https://www.tensorflow.org/versions/r0.12/get_started/os_setup#pip_installation_on_windows

ImportError: DLL load failed: The specified module could not be found. While attempting to import TensorFlow

I get the following error while attempting to import TensorFlow. I tried rolling back to C++ Redist. 2015 (from 2017) and still not working. Win10, Python 3.5(64)
Traceback (most recent call last): File
"C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",
line 18, in swig_import_helper return importlib.import_module(mname)
File "C:\Python35\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level) File "",
line 986, in _gcd_import File "", line 969, in _find_and_load File "",
line 958, in _find_and_load_unlocked File "", line 666, in
_load_unlocked File "", line 577, in module_from_spec File "", line 914, in create_module File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 41, in from tensorflow.python.pywrap_tensorflow_internal import *
File
"C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",
line 21, in
_pywrap_tensorflow_internal = swig_import_helper() File "C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",
line 20, in swig_import_helper return
importlib.import_module('pywrap_tensorflow_internal') File
"C:\Python35\lib\importlib_init.py", line 126, in import_module return
_bootstrap._gcd_import(name[level:], package, level) ImportError: 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
"C:\Python35\lib\site-packages\tensorflow_init_.py", line 24, in from
tensorflow.python import * File
"C:\Python35\lib\site-packages\tensorflow\python_init_.py", line 51,
in from tensorflow.python import pywrap_tensorflow File
"C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 52, in raise ImportError(msg) ImportError: Traceback (most recent
call last): File
"C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",
line 18, in swig_import_helper return importlib.import_module(mname)
File "C:\Python35\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level) File "",
line 986, in _gcd_import File "", line 969, in _find_and_load File "",
line 958, in _find_and_load_unlocked File "", line 666, in
_load_unlocked File "", line 577, in module_from_spec File "", line 914, in create_module File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 41, in from tensorflow.python.pywrap_tensorflow_internal import *
File
"C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",
line 21, in
_pywrap_tensorflow_internal = swig_import_helper() File "C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",
line 20, in swig_import_helper return
importlib.import_module('pywrap_tensorflow_internal') File
"C:\Python35\lib\importlib_init.py", line 126, in import_module return
_bootstrap._gcd_import(name[level:], package, level) ImportError: No module named '_pywrap_tensorflow_internal'
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.
My Working setup in Windows 10 and GTX960M:
Install python 3.5.x
Microsoft visual studio 2015 community edition.
Download and install CUDA toolkit 8.0
Download CuDNN v5.1.
Set CUDA_HOME (\CUDA) and %CUDA_HOME%\bin in PATH.
Extract the cuDNN files to a folder and add that location(the folder where bin,lib, include folders are) also to PATH make sure that cuDNN DLLs are properly set in %PATH%.
Copy the respective files from cuDNN to folders in cuda installation directory(This solved my issues):
copy cudnn64_5.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin.
copy cudnn.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include.
copy cudnn.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64.
Make sure that I have MSVCP140.dll in C:\Windows\System32 and C:\Windows\SysWOW64. If not download it from here: https://www.microsoft.com/en-us/download/details.aspx?id=53587 and install it.
I strongly think these versioning is a bit important in this case.
I tried using cuDNN 6.0 which failed. but 5.1 worked.

Cannot import tensorflow

I thought I had installed tensorflow correctly. I am using python 3.5.2 so it should work. I followed the instructions on the website and installed the CPU only version of tensorflow using pip which seemed to work. However, when, in python, I try to:
import tensorflow as tf
I get the error:
Traceback (most recent call last):
File "C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'tensorflow.python._pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python35\lib\site-packages\tensorflow\python\__init__.py", line 66, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
_pywrap_tensorflow = swig_import_helper()
File "C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow')
File "C:\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\------\Documents\-----\Computing\Python\Neural Networks\test.py", line 1, in <module>
import tensorflow as tf
File "C:\Python35\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Python35\lib\site-packages\tensorflow\python\__init__.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'tensorflow.python._pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python35\lib\site-packages\tensorflow\python\__init__.py", line 66, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
_pywrap_tensorflow = swig_import_helper()
File "C:\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow')
File "C:\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Does anyone know why this error is occurring and how I might be able to fix it?

Categories

Resources