解决“OSError: [WinError 126] 找不到指定的模块”的问题
OSError: [WinError 126] 找不到指定的模块。 Error loading “C:\Users\yyq\AppData\Roaming\Python\Python37\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll” or one of its dependencies.
其实我遇到的问题很简单,我在虚拟环境中把这个torch进行了全局安装,也就是pip install—user
而且没有安装完成,所以导致虚拟环境中也直接调用全局安装的torch,不调用虚拟环境中的torch
我们进入C:\Users\yyq\AppData\Roaming\Python\Python37\site-packages文件夹
删除torch文件夹,即可直接调用虚拟环境中的torch或者重新在虚拟环境中安装torch即可。