我想学习使用TensorFlow,但是,当然,我甚至不能安装它!在
以下是关于我案件的信息:
我遵循以下步骤:
C:\> pip3 install --upgrade tensorflow-gpu
import tensorflow
但我得到了以下错误:
Traceback (most recent call last):
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 62, in preload_check
ctypes.WinDLL(build_info.nvcuda_dll_name)
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import tensorflow
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
self_check.preload_check()
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 70, in preload_check
% build_info.nvcuda_dll_name)
ImportError: Could not find 'nvcuda.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Typically it is installed in 'C:\Windows\System32'. If it is not present, ensure that you have a CUDA-capable GPU with the correct driver installed.
要运行支持GPU的tensorflow,需要安装NVIDIA显卡和CUDA库(请参见requirements here),不幸的是,Intel(R)HD Graphics 520不行。在
您可以接受CPU版本(
pip3 install upgrade tensorflow
),这对于开始学习还是很好的。在更新:另一个解决方案是使用在线服务Google Colab,它允许您从Google的云基础设施借用GPU用于学习。在
相关问题 更多 >
编程相关推荐