DEV Community

Wincent Balin
Wincent Balin

Posted on • Originally published at ofdigitalwater.postach.io on

Run IDLE (Python IDE) in virtual environment

Imagine: you are running software implemented in Python and there is a problem you would like to debug or edit away. The software resides in a virtual environment and apart from this virtual environment and a standard Python installation nothing else is installed (or is not permitted to be installed). What should you do?

You can run IDLE within the activated virtual environment with this command:

python -m idlelib.idle
Enter fullscreen mode Exit fullscreen mode

This command opens the starting window of IDLE with Python prompt. From there you can open the file you would like to edit.

But what if you would open the Python file at once? Use this command then:

python -m idlelib.idle filename
Enter fullscreen mode Exit fullscreen mode

While IDLE does not have all niceties of PyCharm, it is better than Notepad.exe, is almost always installed and has debugging capabilities. You might even enjoy it.

Source: Run IDLE from a batch file

Discussion (0)