best_local_affine_kernel.cu [WinError 126] 在 Windows 10 上找不到指定的模块
Posted
技术标签:
【中文标题】best_local_affine_kernel.cu [WinError 126] 在 Windows 10 上找不到指定的模块【英文标题】:best_local_affine_kernel.cu [WinError 126] The specified module could not be found on Windows 10 【发布时间】:2018-12-29 17:11:41 【问题描述】:我在 Windows 10 上运行 FastPhotoStyle 代码并使用 Python 3.7、CUDA 10.0 和 cuda 9.1。尽管我进行了建议将 Python 版本从字符串升级到字节的更改,但我仍然遇到相同的错误。您能否提出解决此问题的建议。
Resize image: (803,538)->(803,538)
Resize image: (960,540)->(960,540)
Elapsed time in stylization: 2.325060
Elapsed time in propagation: 83.987388
Elapsed time in post processing: 0.015629
Traceback (most recent call last):
File "demo.py", line 47, in
no_post=args.no_post
File "D:\TrainImages\FastPhotoStyle-master\process_stylization.py", line 135, in stylization
out_img = smooth_filter(out_img, cont_pilimg, f_radius=15, f_edge=1e-1)
File "D:\TrainImages\FastPhotoStyle-master\smooth_filter.py", line 402, in smooth_filter
best_ = smooth_local_affine(output_, input_, 1e-7, 3, H, W, f_radius, f_edge)
File "D:\TrainImages\FastPhotoStyle-master\smooth_filter.py", line 333, in smooth_local_affine
program = Program(src.encode('utf-8'),best_local_affine_kernel.cu'.encode('utf-8'))
File "C:\Users\SD\Anaconda3\lib\site-packages\pynvrtc\compiler.py", line 49, in init
self._interface = NVRTCInterface(lib_name)
File "C:\Users\SD\Anaconda3\lib\site-packages\pynvrtc\interface.py", line 87, in init
self._load_nvrtc_lib(lib_path)
File "C:\Users\SD\Anaconda3\lib\site-packages\pynvrtc\interface.py", line 109, in _load_nvrtc_lib
self.lib = cdll.LoadLibrary(name)
File "C:\Users\SD\Anaconda3\lib\ctypes_init.py", line 434, in LoadLibrary
return self.dlltype(name)
File "C:\Users\SD\Anaconda3\lib\ctypes_init.py", line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
我已经把字符串改成了字节
program = Program(src.encode('utf-8'), 'best_local_affine_kernel.cu'.encode('utf-8'))
ptx = program.compile(['-I/usr/local/cuda/include'.encode('utf-8')])
【问题讨论】:
WindowsError: [Error 126] The specified module could not be found的可能重复 【参考方案1】:请在此处查看文档 --> https://github.com/NVIDIA/FastPhotoStyle/blob/master/TUTORIAL.md
上面的链接指定了在 Ubuntu 上的设置,但是 Python 模块也有一些先决条件,你应该已经安装在你的机器上。
【讨论】:
是的,我现在意识到它们在 Ubuntu 的代码中有硬编码路径以上是关于best_local_affine_kernel.cu [WinError 126] 在 Windows 10 上找不到指定的模块的主要内容,如果未能解决你的问题,请参考以下文章