yalcin
yalcin

Reputation: 541

How could I overcome tensorflow-gpu import error?

I'm new tensorflow programming. We have RTX2080 TI GPU in the workstation. Win 10 64 bit OS installed on it. I'm using Pycharm Community Edition 3.1 edıtor

I researched from the net(also from this similar questions) and I set up following versions below:

Cuda 10.00 Cudnn v7.6.2.24 Python 3.6 Tensorflow-gpu 1.14.0

Unfortunately when I run this command:

import tensorflow as tf

Pycharm gave this error into the python console:

 traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:/Users/5G/Desktop/OFDM_DNN-master/OFDM_DNN-master/DNN_Detection/OFDM_ChannelEstimation_DeepLearning_QAM_random_pilot.py", line 5, in <module>
    import tensorflow as tf
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\5G\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\5G\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\5G\AppData\Roaming\Python\Python36\site-packages\tensorflow\core\framework\graph_pb2.py", line 7, in <module>
    from google.protobuf import descriptor as _descriptor
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\5G\AppData\Roaming\Python\Python36\site-packages\google\protobuf\descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
 
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Belirtilen yordam bulunamadı.

How could I overcome these errors? Which versions of Phyton, Cuda,cuDNN, tensorflow-gpu are compatible with each other?

Would you give me advices please??

Upvotes: 0

Views: 233

Answers (2)

yalcin
yalcin

Reputation: 541

I solved my problem just as:

Set up tensorflow -gpu 1.5

after downgrade protobuf 3.6.0 just as:

 pip install protobuf==3.6.0

İt worked!!

Upvotes: 0

Haimantika Mitra
Haimantika Mitra

Reputation: 119

Have you used the command prompt in administrator mode?

Use the below command:

pip3 install --upgrade tensorflow-gpu

Upvotes: 2

Related Questions