File "C:\Program Files\Side Effects Software\Houdini 19.5.303\python39\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import return original_import(name, *args, **kwargs) ImportError: DLL load failed while importing cv2: The specified module could not be found.
cv2 DLL load failing
2035 1 1- sascha
- Member
- 158 posts
- Joined: July 2005
- Offline
Any idea how I can get past that error when importing cv2?
- sascha
- Member
- 158 posts
- Joined: July 2005
- Offline
OK, I found a solution that worked well. Simply set os.add_dll_directory pointing to the $env:CONDAENV/Library/bin directory. I did it in the 123 and 456 hsite scripts with an env var I set in the Conda environment's activate.d/env_vars.ps1 script. You can also use a Houdini environment script instead, but that way Houdini might have conflicts with other packages in the Conda environment like NumPy (Houdini would look at those instead of its own sitepackages).
Edited by sascha - Nov. 7, 2022 03:55:34
-
- Quick Links