ModuleNotFoundError: No module named 'cv2' only when running program more than once

Hi all,
I recently installed opencv on an nvidia xavier. I have some basic code up to just show a video feed from a cam. When I run the program in VSCode it works once, but trying to run it subsequent times without restarting the IDE results in “ModuleNotFoundError: No module named ‘cv2’” Any ideas on how to fix this? Thanks!


Do you change the workspace folder after executing the program.
If yes, please check if the OpenCV library is located on a local folder (1st workspace).