英文:
How could I overcome tensorflow-gpu import error?
问题
我是新的tensorflow编程。我们的工作站上有RTX2080 TI GPU。 安装了Win 10 64位操作系统。我正在使用Pycharm Community Edition 3.1编辑器。
我从网络上进行了研究(也从类似问题中进行了研究),并设置了以下版本:
Cuda 10.00
Cudnn v7.6.2.24
Python 3.6
Tensorflow-gpu 1.14.0
不幸的是,当我运行以下命令时:
import tensorflow as tf
Pycharm在python控制台中出现以下错误:
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:\UsersG\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:\UsersG\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:\UsersG\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 = this._system_import(name, *args, **kwargs)
File "C:\UsersG\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 = this._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Belirtilen yordam bulunamadı.
我该如何克服这些错误?Python,Cuda,cuDNN,tensorflow-gpu的哪些版本是兼容的?
请给我一些建议吗?
英文:
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:\UsersG\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:\UsersG\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:\UsersG\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:\UsersG\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??
答案1
得分: 2
你是否在管理员模式下使用过命令提示符?
使用以下命令:
pip3 install --upgrade tensorflow-gpu
英文:
Have you used the command prompt in administrator mode?
Use the below command:
pip3 install --upgrade tensorflow-gpu
答案2
得分: 0
我解决了我的问题,只需:
设置tensorflow -gpu 1.5
在降级protobuf 3.6.0之后,就像这样:
pip install protobuf==3.6.0
它起作用了!!
英文:
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!!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论