Pyzed import error

I am desparately trying to run the Zed 2 hello_zed sample. I have the following installed:

Cuda 11.0
Python 3.6.4
ZED SDK 3.5

I continue to ge the following error

File “hello_zed.py”, line 21, in
import pyzed.sl as sl
ImportError: DLL load failed while importing sl: The specified module could not be found.

Can you please clearly explain how to fix this issue?

I have spent hours searching for a solution and it is extremely frustrating.

If I need to build from source can you please be clear and explain if I need to copy files to certain locations after building? I have tried all solutions that I have come across.

Did you install Python API? Depending on your platform, wherever you installed zed you should have a get_python_api.py file that you can run and it will automatically install what you need for Python Development.

For Linux with default zed installation, it should be under “/usr/local/zed/get_python_api.py” and you just run it with python.

Check this for more info:
https://www.stereolabs.com/docs/app-development/python/install/#running-the-install-script

1 Like

Thanks for your reply. I am currently trying to install on a Windows 10 OS and yes I have installed the the Python API. I have tried numerous times with various SDK versions. Each time I have started from scratch, deleting the previously intalled SDK and the current version of python. Here is the process I have follwed:

Install python (I have tried with python 3.6 and python 3.9 and Anaconda 3.8)
Install ZED SDK ( I have tried 3.3, 3.4 and 3.5)
I run the get_python_api.py script
Look in the python installation folder to confirm the existence of pyzed (with anaconda I can see that the pyzed directory has been created immediately after the script is done running)
Attempt to run the Hello_zed.py script

These step result in the following error:
import pyzed.sl as sl
ImportError: DLL load failed while importing sl: The specified module could not be found.

I have read multiple comments about copying the dll files from the ZED SDK bin folder to the pyzed directory. Is this a necessary step? If so can you elaborate on what files should be copied to which location.

I can upload a video of the process if you believe that would be more helpful.

I figured out there was an unrelated issue with my graphics card that was causing issues. Thanks for the help

1 Like

hey,I have the same problem with you. did you ever solve the problem?

same issue, need help

@CharlesDCXX @kcn3388 can you please specify the OS / ZED SDK version / Python version you are using as well as the error log you get ? Also, are you using a virtual environment for your Python developement ? If that is the case, don’t forget to activate your environment before installing the package and before running any script that is using the Python API.
Thanks in advance !