Issue
Pytorch GPU did work for me, but after reinstalling anaconda I got this error: Error loading “caffe2_detectron_ops.dll” (when installing the cpu version) or Error loading “caffe2_detectron_ops_gpu.dll” (when installing the gpu version) This error appears already when importing torch in spyder IDE. Total error message: "OSError: [WinError 182] The operating system cannot run %1. Error loading "C:\Users\konin\anaconda3\envs\pytorch_env\lib\site-packages\torch\lib\caffe2_detectron_ops.dll" or one of its dependencies."
Simply deleting “caffe2_detectron_ops.dll” will give me a new error: Error loading “caffe2_module_test_dynamic.dll”, then error loading “caffe2_observers.dll”, …
Deleting all of them didn’t solve my problem, it ended up with error “ImportError: DLL load failed while importing _C”. I’m working in a conda environment (python 3.9.7), and starting new environments give the same errors. CPU or GPU download of pytorch won’t make a difference. Installing intel-openmp didn’t fix it. Reinstalling torch didn't help.
I've done everything I could find about this error message. It is actually working when using the CMD prompt, but not when running the file in spyder.
Any suggestion would be really appreciated, thanks
Solution
Btw, for everyone curious, got it solved by resetting all of my enviroments, and setting up my environments more cleanly. Probably this conda environment got corrupted by my base environment files.
Answered By - kingrool
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.