I would like to use only one Python3 version for all my packages in a Gentoo system. So I looked for the installed versions and found out that three versions are installed: 3.6, 3.7 and 3.8. I would like to convert all packages to 3.8 and delete the previous versions.
My plan:
- Unmerge Python 3.6 and 3.7.
- Set the
USE
flag for packages that use Python topython3_8 -python3_7 -python3_6
. - Rebuild those packages with
emerge --update --newuse
to let them use Python 3.8.
So after removing Python 3.6 with:
emerge --ask -C dev-lang/python:3.6
I added the line
virtual/python-ipaddress python3_8 -python3_7 -python3_6
to /etc/portage/package.use
and run
emerge --ask --update --newuse --deep virtual/python-ipaddress
and I get
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild NS ] dev-lang/python-3.6.11-r2 [2.7.18-r1, 3.7.8-r2, 3.8.4-r1] USE="(threads%*)"
Would you like to merge these packages? [Yes/No]
I do not understand this behaviour: why does emerge want to install python-3.6
if /etc/portage/package.use
specifies that it should use 3.8
? And why does the USE
variable not contain any Python specification? Is there another configuration file that has higher priority than /etc/portage/package.use
and redefines the USE
variable? From what I understand by reading the documentation, this should not happen.