I have installed python 3 on my kubuntu PC.
However as the default version of python on kubuntu is 2.5 Idle uses python 2.5 instead of the newly installed python 3

(i used the "python3.0" package for installing python and "idle" package for IDLE when i was installing using synaptic package manager)

Dani AI

Generated

IDLE is tied to the Python interpreter it was installed for. On Debian/Ubuntu (and Kubuntu) the simple fix is to use the Python‑3-specific IDLE package or launch IDLE using the Python3 interpreter directly, rather than trying to change the system default Python.

Install or find the Python‑3 IDLE package (names vary by release: idle3 or idle-python3.x) and then start IDLE with Python3 like this:

python3 -m idlelib

Create a KDE menu/desktop launcher that runs that command if you want a permanent GUI shortcut (this is the Linux analogue of 's Windows wrapper and of 's Start Menu note). To confirm which interpreter an IDLE session is using, run inside the shell:

import sys
print(sys.version)
print(sys.executable)

Do not change the system /usr/bin/python symlink to point to Python3 — many older Ubuntu tools expect the system Python to be the distro-provided version. If you need multiple interpreters side-by-side for development, consider using explicit commands, launchers, virtual environments, or a version manager so system tools stay intact. For details on the IDLE module, see the official docs: IDLE — Python documentation.

Recommended Answers

All 2 Replies

Member Avatar for Member #361407

i dont know about kubuntu but with windows after i installed it you need to look on the start bar in all programs and there is the folder Python30

Even the IDLE that comes with Python30 will insist to use PYthon25 if installed. There must be a file association config file somewhere that screws this up.

I finally wrote a batch file (I use Windows Vista) and that solves the problem:

REM a batch file to force IDLE to use Pyhon30
REM saved as IDLE30.bat
C:\Python30\pythonw.exe -u C:\Python30\Lib\idlelib\idle.pyw

By the way, I really hate VISTA (their socalled security is childish, rather annoying and stupid)!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.