Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tensorflow-gpu not working #35767

Closed
praharshbhatt opened this issue Jan 11, 2020 · 4 comments
Closed

tensorflow-gpu not working #35767

praharshbhatt opened this issue Jan 11, 2020 · 4 comments
Assignees
Labels
stat:awaiting response Status - Awaiting response from author subtype:windows Windows Build/Installation Issues TF 2.1 for tracking issues in 2.1 release type:build/install Build and install issues

Comments

@praharshbhatt
Copy link

praharshbhatt commented Jan 11, 2020

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10, 64 bit
  • TensorFlow installed from (source or binary): source
  • TensorFlow version: tensorflow-gpu==2.1.0
  • Python version: Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] on win32
  • Installed using virtualenv? pip? conda?: pip
  • CUDA/cuDNN version: CUDA: 10.1
  • GPU model and memory: GeForce GTX 1060 with Max-Q, Memory: 8GB

Describe the problem

Tensorflow is not able to get imported properly.
the program is simple:

import tensorflow as tf

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

Tensorflow returns following error:

"D:\Multiverse_Projects\Python Environment\Scripts\python.exe" "D:\Apps\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 50936 --file "D:/Multiverse_Projects/Final year project- Fall Detection/fall-detection-two-stream-cnn-master/tensorflow_test.py"
pydev debugger: process 4236 is connecting

Connected to pydev debugger (build 191.7479.30)
Traceback (most recent call last):
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\prahu\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\prahu\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
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:\Apps\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev\pydevd.py", line 1758, in <module>
    main()
  File "D:\Apps\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev\pydevd.py", line 1752, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "D:\Apps\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev\pydevd.py", line 1147, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "D:\Apps\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "D:/Multiverse_Projects/Final year project- Fall Detection/fall-detection-two-stream-cnn-master/tensorflow_test.py", line 1, in <module>
    import tensorflow as tf
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow\__init__.py", line 101, in <module>
    from tensorflow_core import *
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow_core\__init__.py", line 40, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
    module = self._load()
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow\__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "C:\Users\prahu\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow_core\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "D:\Multiverse_Projects\Python Environment\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\prahu\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\prahu\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: 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.

Process finished with exit code -1

I have set all the environment variables.
One issue I faces during the installation was that the cudnn-10.1 zip downloaded from the Nvidia website seems to be corrupt, no matter what zip software I use.

Although, I was able to unzip the required files (not sure if they are not broken), and follow this process: https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#install-windows

I've tried multiple TensorFlow versions including the CPU only ones. Same issue in each.

@TyrionWarMage
Copy link

Please try to install the correct VisualC++ Redist. - see #35036 (comment)

@gadagashwini-zz gadagashwini-zz self-assigned this Jan 13, 2020
@gadagashwini-zz gadagashwini-zz added the TF 2.1 for tracking issues in 2.1 release label Jan 13, 2020
@gadagashwini-zz
Copy link
Contributor

@praharshbhatt, Check your CPU model, does your CPU support AVX instruction sets?
Next, MSVC 2015 redistributable update 3. It is listed here under windows:
https://www.tensorflow.org/install/pip.

@gadagashwini-zz gadagashwini-zz added the stat:awaiting response Status - Awaiting response from author label Jan 13, 2020
@gadagashwini-zz
Copy link
Contributor

@praharshbhatt, Were you able to solve this issue. Thanks!

@praharshbhatt
Copy link
Author

Thanks for the reply, I had the work done with visual CV so did not have to install Tensorflow.
I will comment if the issue arises in future.

@gadagashwini-zz gadagashwini-zz added subtype:windows Windows Build/Installation Issues type:build/install Build and install issues labels Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Status - Awaiting response from author subtype:windows Windows Build/Installation Issues TF 2.1 for tracking issues in 2.1 release type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

3 participants