简体   繁体   English

我怎样才能克服 tensorflow-gpu 导入错误?

[英]How could I overcome tensorflow-gpu import error?

I'm new tensorflow programming.我是新的 tensorflow 编程。 We have RTX2080 TI GPU in the workstation.我们在工作站中有 RTX2080 TI GPU。 Win 10 64 bit OS installed on it. Win 10 64 位操作系统安装在它上面。 I'm using Pycharm Community Edition 3.1 edıtor我正在使用 Pycharm 社区版 3.1 编辑器

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 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: Pycharm 在 pyhton 控制台中给出了这个错误:

 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? Phyton、Cuda、cuDNN、tensorflow-gpu 哪些版本兼容?

Would you give me advices please??请给我建议好吗??

Have you used the command prompt in administrator mode?您是否在管理员模式下使用过命令提示符?

Use the below command:使用以下命令:

pip3 install --upgrade tensorflow-gpu

I solved my problem just as:我解决了我的问题,就像:

Set up tensorflow -gpu 1.5设置 tensorflow -gpu 1.5

after downgrade protobuf 3.6.0 just as:将 protobuf 3.6.0 降级后如下:

 pip install protobuf==3.6.0

İt worked!!有效!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM