importError: No module named pyzed.sl as sl

Hello,

I saw that there are threads dealing with a similar error, however I still couldn’t resolve this issue after reading them.

I’m trying to run a python script on the zed box machine (Xavier NX model, Ubuntu 18.04, python 3.6.9) but the interpreter can’t find the pyzed model. Running the help(‘moudles’) command verifies that there’s no pyzed module.

Beforehand, I’ve installed the entire zed sdk 3.8.2 version package for jetson as instructed in stereolabs “Getting Started” section. I’ve also tried reinstalling the Python API itself from the SDK library (“get_python_api.py”) although it was installed earlier with the SDK itself.

Please take note, plugging the camera and running the SDK standalone apps (ZED explorer, ZED Depth viewer) works with no problems. Also I’m not working with any virtual environments.

Any help would be appreciated.

Hello,

This error messages means that the python module is not found.
Can you send the exact logs that happens when you install pyzed ? What do you run then ? It’s highly possible that’s it is a python executable mismatch. For example, sudo python and python is different.

Thank you for your help.

I’ve reinstall the SDK and attached the installation log bellow.

Afterwards I’ve tried running the script from the terminal again with the following commands (“sudo python script_name.py” and “python script_name.py”) but the above error repeated itself in both cases. Again this was done with the default system path (the same one which was used to run the SDK installation file) and not under any virtual environments.

log.txt (4.9 KB)

would reinstalling the SDK using the sudo command might resolves this ?

Hi,

The installation logs are correct. However, I don’t see the log from your own program (including the command you run for your app).

Also what comes from the command

python3 -m pip show pyzed

I’ve attached the output for the following command

python3 -m pip show pyzed

everything seems to be fine.

Afterwards I tried to run the script using the same syntax instead of “python” and it worked:

python3 script.py

I guess that for this version of ubuntu python 3 isn’t defined as the default interpreter.
In any case thank you very much for your help with this issue.

Indeed, python often is python2.

Happy programming !