eselect python list/edit/set stuff
to set current version.
Check /usr/lib/python-exec subdirs for content. The python version you had selected should have a lot of binaries like emerge in his dir. If there is no such stuff you will have to re-emerge portage. Btw you can check your current status with emerge –info. If calling emerge produces the error message in the title, you can call emerge using its direct path in older versions you find in /usr/lib/python-exec. (i.e. /usr/lib/python-exec/python3.7/emerge).
Some internet sources tell you, that sometimes the only thing to do is to re-emerge python with USE flag ‘tk’ switched on, but it didnt work for me.
Since Python3.8 the eselect mechanism is obsolete. PYTHON_TARGET and PYTHON_SINGLE_TARGET should contain the latest and actual version only. Must fit to /etc/python-exec/python-exec.conf: latest to, others down for fallback. Re-emerge portage after python updates. Have an eye on /usr/lib/python-exec – the latest version should contain a lot of stuff, at least a version of ’emerge’. If not, re-emerge ‘portage’.
emerge --depclean emerge -1vUD @world emerge --depclean