I have successfully installed picamera2 using this tutorial and I am able to run a script just fine from CLI. The script:
from picamera2.picamera2 import *
from time import sleep
picam2 = Picamera2()
picam2.start_preview(Preview.QTGL)
config = picam2.preview_configuration()
picam2.configure(config)
picam2.start()
sleep(5)
And I run it in terminal python script_name.py
and it works as it should. But when I run it in Thonny IDE the script returns:
ModuleNotFoundError: No module named 'picamera2'
To my knowledge I have set the default interpreter in Thonny \usr\bin\python3
and tried also with \usr\bin\python3.9
and \usr\bin\python
- they all seem to point to python version 3.9.2 - which is also the version displayed in terminal when running python -V
or python3 -V
. What am I missing or doing incorrectly?