不能运行premade_estimator.py文件

按照机器学习新手使用入门运行示例程序:

错误:

python: can't open file 'premade_estimator.py': [Errno 2] No such file or directory(tensorflow) C:\Users\RainysunnyDay>cd models\samples\core\get_started(tensorflow) C:\Users\RainysunnyDay\models\samples\core\get_started>python premade_estimator.pyTraceback (most recent call last): File "C:\Users\RainysunnyDay\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check ctypes.WinDLL(build_info.cudart_dll_name) File "C:\Users\RainysunnyDay\Anaconda3\envs\tensorflow\lib\ctypes\__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode)OSError: [WinError 126] 找不到指定的模块。During handling of the above exception, another exception occurred:Traceback (most recent call last): File "premade_estimator.py", line 20, inimport tensorflow as tf File "C:\Users\RainysunnyDay\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, infrom tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\RainysunnyDay\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, infrom tensorflow.python import pywrap_tensorflow File "C:\Users\RainysunnyDay\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in self_check.preload_check()

  File "C:\Users\RainysunnyDay\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\platform\self_check.py", line 82, in preload_check

    % (build_info.cudart_dll_name, build_info.cuda_version_number))

ImportError: Could not find 'cudart64_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-toolkit


不能运行premade_estimator.py文件_第1张图片

解决:

下载并安装CUDA9.0

你可能感兴趣的:(不能运行premade_estimator.py文件)