versionpython-idle

python -m idlelib Switch to specific py version


MultiProcessing doesn't correctly show results in IDLE's output window, but it does show in IntelliJ / commandPrompt's Output window.

I'm trying to run:

python -m idlelib

But my environment variable is set to 2.7 (and I DONT WANT to change this),

I just want to run IDLE from the command prompt as i.e. 3.10

How do I run a specific IDLE version from the command prompt? I'd imagine it to be:

python -m C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Lib\idlelib

Solution

  • There is no IDLE version separate from the version of Python that it comes with. This is the same as for all other stdlib modules. Currently, when you run 3.x IDLE (with 3.x), IDLE runs the code you write or load into IDLE with 3.x, by default in a separate process. To run 3.10 IDLE on Window, install 3.10 with the 'py' launcher and enter py -3.10 -m idlelib in CommandPrompt. (Edited to add -m.)

    I have no idea why you would want to run 3.10 IDLE with 2.7; what do you wish to accomplish? But I expect the command you gave would quickly fail with a SyntaxError. If not, importing tkinter would fail as that was called 'Tkinter' in 2.7.