Issue 1:
System information

script provided in TensorFlow : import tensorflow as tf.

OS Platform and Distribution Windows 7 64 bits:

TensorFlow installed from binary:

TensorFlow version 1.6:

Python 3.6:

Bazel version : no bazel:

GCC/Compiler version : no compiler:

CUDA/cuDNN version : CPU, not GPU:

GPU model and memory: no GPU:

compiling a python program with Pycharm:

Describe the problem

I got a bug when using Version 1.6.

Version 1.5 works fine on the same environment. But I need version Tensorflow 1.6 to run Mozilla's deepspeech tool.

Source code / logs

Traceback (most recent call last):

File "C:\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper

return importlib.import_module(mname)

File "C:\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 with error code -1073741795

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in

from tensorflow.python.pywrap_tensorflow_internal import *

File "C:\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in

_pywrap_tensorflow_internal = swig_import_helper()

File "C:\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper

return importlib.import_module('pywrap_tensorflow_internal')

File "C:\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'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 566, in run_nodebug

File "", line 1, in

File "C:\Python36\lib\site-packages\tensorflow_init_.py", line 24, in

from tensorflow.python import *

File "C:\Python36\lib\site-packages\tensorflow\python_init_.py", line 49, in

from tensorflow.python import pywrap_tensorflow

File "C:\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in

raise ImportError(msg)

ImportError: Traceback (most recent call last):

File "C:\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper

return importlib.import_module(mname)

File "C:\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 with error code -1073741795

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in

from tensorflow.python.pywrap_tensorflow_internal import *

File "C:\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in

_pywrap_tensorflow_internal = swig_import_helper()

File "C:\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper

return importlib.import_module('pywrap_tensorflow_internal')

File "C:\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'

Issue 2:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 server in desktop mode

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: NA

TensorFlow installed from (source or binary): binary

TensorFlow version (use command below): tensorflow-gpu 1.10.0

Python version: Anaconda x64 3.6

Bazel version (if compiling from source): NA

GCC/Compiler version (if compiling from source): NA

CUDA/cuDNN version: 9.0/7.0

GPU model and memory: Q4000

Exact command to reproduce: N/A

Describe the problem

Create a python application that imports tensorflow-gpu

Package the application with pyinstaller

Start the generated executable, that crashes while trying to import tensorflow.

The error trace is this:

Traceback (most recent call last):
File "site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
File "c:\users\paperspace\.virtualenvs\***-ecouzwts\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in <module>
File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
File "importlib\__init__.py", line 126, in import_module
ModuleNotFoundError: No module named 'tensorflow.python._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.

On the other hand, doing the same process with tensorflow(-cpu) works fine.

I ruled out CUDA/cuDNN installation issue, because if I run my python application using python, it works fine with the GPU version.

I have tried checking at the .exe with dependency_walker, but appart from false-positive missing API-MS-* and EXT-MS-* DLLs, I don't see anything obvious.

So I'm stuck here.

What discrepancy could create an import issue with tensorflow-gpu and not with tensorflow-cpu ?