I am using a Raspberry Pi OS 64-bit to run a script that will capture an image. I have gone through installing the right packages for libcamera for this OS and can run libcamera apps using my terminal. I get the error: no module named picamera2 whenever I try to run the script in thonny ide.
However, I have set my pythonpath variable to
/home/pi/picamera2:/home/pi/libcamera/build/src/py:/home/pi/kmsxx/build/py:/home/pi/python-v4l2
and when I run the command "thonny&" or "thonny" from my terminal, my script runs without an error
Please, how can I be able to run my scripts without having to go through this process?