View previous topic :: View next topic |
Author |
Message |
diem n00b
Joined: 19 Sep 2019 Posts: 19
|
Posted: Sat May 08, 2021 3:32 pm Post subject: [Solved] Python 2.7 still installed; nothing depends on it. |
|
|
Hi all,
To the best of my knowledge, I have done everything necessary to remove all dependencies on Python 2.7, yet the interpreter remains stubbornly installed:
Code: | $ equery l dev-lang/python
* Searching for python in dev-lang ...
[IP-] [ ] dev-lang/python-2.7.18_p9:2.7
[IP-] [ ] dev-lang/python-3.7.10_p3:3.7/3.7m
[IP-] [ ] dev-lang/python-3.8.9_p2:3.8
[IP-] [ ] dev-lang/python-3.9.4_p1:3.9 |
Further proof of lack of dependency below, but the core questions is, is this normal, and if so can someone explain to me why?
The Python 2.7 cleanup article from last year says that a few high-profile packages depend upon 2.7 (Chromium, Mozilla packages and PyPy are listed examples), however none of these still do so (nor does anything else. Checking dependencies for the 2.7 interpreter version does return reams of output, but grepping the output for 'python2' (to cover both python_targets and python_single_target variants) returns no output at all:
Code: | $ equery d dev-lang/python-2.7.18_p9 | grep python2
$ |
I do not reference PYTHON_TARGETS in either make.conf nor any file in package.use, and /usr/portage/profiles/base/make.defaults lists PYTHON_TARGETS="python3_8".
I have eselected 3.8:
Code: | $ eselect python list
Available Python interpreters, in order of preference:
[1] python3.8
[2] python3.9 (fallback)
[3] python3.7 (fallback)
|
Finally, I have not added any Python version explicitly to my selected set:
Code: | $ cat /var/lib/portage/world | grep python
dev-python/certifi
dev-python/cherrypy
dev-python/importlib_metadata
dev-python/more-itertools
dev-python/netaddr
dev-python/pip
dev-python/setuptools
dev-python/setuptools_scm
dev-python/zipp |
Any suggestions as to why 2.7 is stubbornly sticking around? As ever, I am loath to force deselection of a package, trusting portage to do its job.
Thanks all,
Ian
Last edited by diem on Sat May 08, 2021 6:56 pm; edited 1 time in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sat May 08, 2021 3:36 pm Post subject: |
|
|
Hi try
Code: |
emerge -cav =dev-lang/python-2.7.18_p9
grep -r python2_7 /etc/portage
|
_________________
Last edited by alamahant on Sat May 08, 2021 3:53 pm; edited 3 times in total |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Sat May 08, 2021 3:39 pm Post subject: |
|
|
diem wrote: | The Python 2.7 cleanup article from last year says that a few high-profile packages depend upon 2.7 (Chromium, Mozilla packages and PyPy are listed examples), however none of these still do so |
Code: | $ emerge --depclean -qpv python:2.7
dev-lang/python-2.7.18_p9 pulled in by:
dev-qt/qtwebengine-5.15.2_p20210421 requires >=dev-lang/python-2.7.5-r2:2.7 |
You would get the same result for chromium. |
|
Back to top |
|
|
freke l33t
Joined: 23 Jan 2003 Posts: 976 Location: Somewhere in Denmark
|
Posted: Sat May 08, 2021 4:17 pm Post subject: |
|
|
diem wrote: | Code: | $ equery d dev-lang/python-2.7.18_p9 | grep python2
$ |
|
Doesn't work - only greps in ebuild-names, doesn grep in the output after each ebuild (ie. you wouldn't get any output with grep python3 either) |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21605
|
Posted: Sat May 08, 2021 4:43 pm Post subject: |
|
|
What have you done to remove it? Portage won't arbitrarily remove a package just because nothing needs it, because you might need it soon, so proactively removing it could cause more work later. You need to ask Portage to do such a cleanup, with emerge --depclean --ask. The command from alamahant is a shortened and targeted variation of this. |
|
Back to top |
|
|
diem n00b
Joined: 19 Sep 2019 Posts: 19
|
Posted: Sat May 08, 2021 6:56 pm Post subject: |
|
|
Many thanks all for your swift and accurate replies.
tl;dr I have dev-qt/qtwebengine installed, and didn't notice the dependency thanks to my incorrect usage of grep (thanks @freke)
@Hu I do follow a strict routine to keep my package set 'clean', including removing dependencies no longer required - should've said so in my original post.
Finally, thanks @asturm for a compact method to identify what remaining Python 2.7 dependencies I have - just %$#^@ qtwebengine! Now I have another reason to dislike it alongside its insanely long compile time
Cheers,
Ian |
|
Back to top |
|
|
|