How could I overcome tensorflow-gpu import error?

437 views
Skip to first unread message

Ahmet Emir

unread,
Jan 3, 2020, 3:50:20 PM1/3/20
to Discuss
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 Pyhton 3.6 Tensorflow-gpu 1.14.0

Unfortunately when I run this command:


import tensorflow as tf

Pycharm gave this error into the pyhton 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

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??


Best regards..

John Davis

unread,
Jan 3, 2020, 4:36:36 PM1/3/20
to Ahmet Emir, Discuss
Someplace on the tensorflow site is a doc which lists Ubuntu version, python version, tensorflow version and cuda version.  I found it once but I can’t find it now.  If you use the tensorflow install guide and click all the links you might find it.  If nothing else try using the guide and it will give you a working setup.



--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/853a370f-a506-44b5-9014-6347b6f073ac%40tensorflow.org.
--
Rocking the roll like a natural man!

Sean Morgan

unread,
Jan 4, 2020, 7:16:47 AM1/4/20
to Discuss
Here is the build matrix:

That error looks like it could be something other than build compatibility though. Could you post the remainder of the stack trace?


To unsubscribe from this group and stop receiving emails from it, send an email to dis...@tensorflow.org.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Ahmet Emir

unread,
Jan 4, 2020, 7:50:53 AM1/4/20
to Discuss
Sorry,

I senty to you all traceback. Also I upgrade tensorflow gpu 1.14.0 pycharm gave same error:

traceback (most recent call last):
 module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Belirtilen yordam bulunamadı.

4 Ocak 2020 Cumartesi 15:16:47 UTC+3 tarihinde Sean Morgan yazdı:

Ahmet Emir

unread,
Jan 4, 2020, 7:57:14 AM1/4/20
to Discuss

apologised I am able to copy all  traceback. correct one is present below:

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ı.



4 Ocak 2020 Cumartesi 15:50:53 UTC+3 tarihinde Ahmet Emir yazdı:
Sorry,

I senty to you all traceback. Also I upgrade tensorflow gpu 1.14.0 pycharm gave same error:

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 =<span class="pln" style="color: rg

Sean Morgan

unread,
Jan 4, 2020, 8:07:31 AM1/4/20
to Discuss
Seems similar to this issue:

Try downgrading protobuf to 3.6.0? This shouldn't be required if installing the PyPi wheel but still worth a look.

Ahmet Emir

unread,
Jan 4, 2020, 12:38:50 PM1/4/20
to Discuss
I downgraded protobuf 3.6.0 . It works . Thanks for your help

4 Ocak 2020 Cumartesi 16:07:31 UTC+3 tarihinde Sean Morgan yazdı:
Reply all
Reply to author
Forward
0 new messages