Skip to content

tensorflow-gpu rc0 import tensorflow error windows 10 64bit nvidia 1080 TI #9066

Closed
@udnaan

Description

@udnaan

NOTE: Issues that are not bugs or feature requests will be closed. Please ask usage questions on StackOverflow.

You must complete this information or else your issue will be closed

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow)?:
    No
  • TensorFlow installed from (source or binary)?:
    binary
  • TensorFlow version:
    pip rc0 or rc1
    nightly
  • Bazel version (if compiling from source):
    NA
  • CUDA/cuDNN version:
    8.0
  • GPU Model and Memory:
    Nvidia 1080 ti
  • Exact command to reproduce:
    install tensorflow from nightly or using tensorflow==1.1.0rc0 or 1.1.0rc1 through pip (I'm using conda to create the environment)
    start python
    import tensorflow

Describe the problem clearly

I followed the suggestion of installing nightly due to the warnings regarding unknown OP
see #8500
The install is successful however the import tensorflow fails with the following log

Source Code / Logs

Python 3.5.3 |Continuum Analytics, Inc.| (default, Feb 22 2017, 21:28:42) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "c:\tools\Anaconda3\envs\tensorflow\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: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
    return importlib.import_module('_pywrap_tensorflow_internal')
  File "c:\tools\Anaconda3\envs\tensorflow\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:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 51, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "c:\tools\Anaconda3\envs\tensorflow\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: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "c:\tools\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
    return importlib.import_module('_pywrap_tensorflow_internal')
  File "c:\tools\Anaconda3\envs\tensorflow\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.

Activity

LeifRoss

LeifRoss commented on Apr 8, 2017

@LeifRoss

Having the same issue, tried pretty much all of the relevant builds on jenkins, and its either the OPS error, or this one.

If you just need a version of tensorflow to work with asap, you can get the cpu version running by installing version 1.1.0rc1 and suppressing the level 2 warnings.

pip3 uninstall tensorflow-gpu
pip3 install --upgrade tensorflow==1.1.0rc1

import tensorflow as tf
import os

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

And then install the gpu version when someone replies with a proper fix.

ZacDiggum

ZacDiggum commented on Apr 8, 2017

@ZacDiggum

Same thing over here.
System specs are identical to @udnaan's except the GPU is a GTX 1080. This solution doesn't help either. Any ideas?

AdityaPrasadMishra

AdityaPrasadMishra commented on Apr 9, 2017

@AdityaPrasadMishra

I am facing the same issue with 840M GPU.

Carmezim

Carmezim commented on Apr 9, 2017

@Carmezim
Contributor

Hi @udnaan, sorry you're facing issues.
Could you please check if your CUDA and cuDNN environment variables are properly set and their DLLs directories are found in your %PATH%

udnaan

udnaan commented on Apr 9, 2017

@udnaan
Author

Already done.

PATH=C:\Users\nan\Downloads\ConEmu\ConEmu\Scripts;C:\Users\nan\Downloads\ConEmu;C:\Users\nan\Downloads\ConEmu\ConEmu;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp;C:\Python36\Scripts\;C:\Python36\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin;c:\tools\Anaconda3\Scripts;c:\program files\Cmake\bin;C:\Program Files (x86)\vim\vim80;c:\Program files\git\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;c:\tools\Anaconda3\Scripts

The dll files are inside the C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin folder

The issue seems to be with the following versions: rc0 - onwards and nightlies.
The 1.0 version works but with the unknown OP warning (the ones that I've noted in the original report)

Carmezim

Carmezim commented on Apr 9, 2017

@Carmezim
Contributor

@udnaan After 1.0 there were changes on how TF load CUDA related DLLs, see this.

Regarding OpKernels logs, they can be ignored. Just checking, your cuDNN is 5.1, right? Which nightly build did you install?

udnaan

udnaan commented on Apr 9, 2017

@udnaan
Author
Carmezim

Carmezim commented on Apr 9, 2017

@Carmezim
Contributor

@udnaan a way for you to check if is not Cuda related is to uninstall TF and install the CPU version and if you still receive the same error is TF or Anaconda wise .

udnaan

udnaan commented on Apr 9, 2017

@udnaan
Author

@Carmezim thanks for the hint. I'll try that as well. Will take a couple of hours since I'm afk atm

udnaan

udnaan commented on Apr 10, 2017

@udnaan
Author

@Carmezim You were right. I was missing the cudnn library all together. Thanks a lot for your help.

Carmezim

Carmezim commented on Apr 10, 2017

@Carmezim
Contributor

@udnaan you're welcome.

Carmezim

Carmezim commented on Apr 10, 2017

@Carmezim
Contributor

@LeifRoss @AdityaPrasadMishra @ZacDiggum Did you make progress with the solution?
Let me know if you're still facing issues.

Carmezim

Carmezim commented on Apr 10, 2017

@Carmezim
Contributor

HI @mrry, do you think even affecting a very small subset of users is worth a reference on common problems about CUDA related DLLs installation when receiving this error?

LeifRoss

LeifRoss commented on Apr 10, 2017

@LeifRoss

@Carmezim Indeed, the issue has been resolved, thank you for the assistance!

11 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mrry@LeifRoss@udnaan@ZacDiggum@AdityaPrasadMishra

        Issue actions

          tensorflow-gpu rc0 import tensorflow error windows 10 64bit nvidia 1080 TI · Issue #9066 · tensorflow/tensorflow