Python: idle: no python-exec wrapped executable found in /usr/lib/python-exec
Python IDLE
IDLE is Python’s Integrated Development and Learning Environment where it allows programmers to easily write Python code. It's like a shell, you can execute a single statement or create/execute a Python script.
If you see below error message when you try to run IDLE, it's most likely you are missing tk USE flag for python.
idle: no python-exec wrapped executable found in /usr/lib/python-exec
To check if you are missing the tk USE flag, first check the python version:$ eselect python list
Available Python interpreters, in order of preference:
[1] python3.8
[2] python3.9 (fallback)
Also, check the system configuration file, /etc/python-exec/python-exec.conf, for python version:
Then, execute emerge with the following flags to see if tk USE flag was enabled originally. In below case, tk is not enabled since it's -tk.# emerge -pve world | grep -i dev-lang/python-3.8
[ebuild R ] dev-lang/python-3.8.8:3.8::gentoo USE="gdbm ipv6 ncurses readline sqlite ssl xml -bluetooth -build -examples -hardened (-libressl) -test -tk -verify-sig -wininst" 0 KiB
Disclaimer:
The information in this site is the result of my researches on the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.
To enable the flag, you need to re-run emerge with the tk flag.# USE=tk emerge -a dev-lang/python:3.8
After successful update, check if it's enabled by running the same command: # emerge -pve world | grep -i dev-lang/python-3.8
[ebuild R ] dev-lang/python-3.8.8:3.8::gentoo USE="gdbm ipv6 ncurses readline sqlite ssl tk xml -bluetooth -build -examples -hardened (-libressl) -test -verify-sig -wininst" 0 KiB
That's all!
-gibb