I am using a raspian OS for my python projects, and most of the cases I run the scripts directly using a virtual environment. For the cases that i need to use a compiler like Python IDLE a way to open it from within the virtual environment is by running the following command, after you enable it of course.
python -m idlelib.idle