How to use zed in ros using python

In the ros system I use,

import pyzed.sl

when editing the program in the ros environment,it shows:
Traceback (most recent call last):
File “/home/young/my_yolo/src/yolov7-ros/src/detect_ros.py”, line 24, in
import pyzed.sl as sl
ModuleNotFoundError: No module named ‘pyzed’

Please tell me how to configurein ros environment so that we can use the import pyzed.sl as sl module . thank you.

import pyzed.sl
it can be used successfully in my python environment,but can not used in ros environment,I wonder if we should configure the environment in cmakelist.txt

Hi @zhangYQHBAU
what Python version are you using with ROS?
Is it different from the version you selected when installing the ZED Python wrapper with the ZED SDK installer?

I used the noetic and python3.8

Why do you need the ZED Python wrapper? If you are writing a Python node that subscribes to ZED topics you do not need pyzed.sl. You need it only if you plan to re-write the ZED ROS Wrapper in Python.