pyZed is not work on windows

Hi I use anacondas to create virtual environmental for the zed 2 cameras. my desktop use zed sdk 4.0.6 and cuda 12.0. However, when I created virtual environment and install pyzed by using the get_python_api script from zed sdk folder inside the anaconda environmental. I got this error when I tried to run the tutorial 1 “Hello ZED” python script.

ImportError: DLL load failed while importing sl: The specified module could not be found.

I tried difference python versions from python 3.6 to python 3.10 and it didn’t solve the problem. I also checked the anaconda environmental and both of the sl_ai64, sl_zed64 are in this directory site-package/pyzed. I also copied whole bin files in ZED SDK to the site-packages/pyzed and the problem still not solves. I run out of solution so can you help me?
Thanks

Hello @nctran,

From this: python - ImportError: DLL load failed: The specified module could not be found - Stack Overflow
Can you run

dumpbin /dependents

It will help you find out what DLL the pyzed module is trying to find. Then, you can find out exactly which one it can find, which one it cannot.
Finally, you can add to your PATH the folder that is missing, or copy the DLLs into pyzed’s folder.

so I need to run this in anacondas terminal?

You should run dumpbin on the pyd generated by get_python_api, its path is given at the end of the install with get_python_api

It gives the path to the conda env folder, so it doesn’t matter if you run it from conda or not, just run it on the correct pyd. It should look like C:\Users\user\.conda\envs\py38\Lib\site-packages\pyzed\sl.cp38-win_amd64.pyd.

It seems that usually, referencing this post,

the missing dll often is NvEncoreApi.dll

Can you post the output of running the get_python_api script?

There is an issue with the script on Windows where it fails to install PyOpenGL-accelerate, which then causes the script to abort right before it copies the SL DLLs over.