1 |
On Sunday, 7 March 2021 18:43:29 GMT Steven Lembark wrote: |
2 |
> Checking my environment, I'd expect that "python" is 3.9.1, I think? |
3 |
> |
4 |
> # which python |
5 |
> /usr/bin/python |
6 |
> |
7 |
> # ls -al /usr/bin/python |
8 |
> lrwxrwxrwx 1 root root 13 Oct 20 10:46 /usr/bin/python -> python-exec2c |
9 |
> |
10 |
> # /usr/bin/python --version; |
11 |
> Python 3.9.1 |
12 |
> |
13 |
> (ins)root@dizzy ~ # eselect python list; |
14 |
> Available Python interpreters, in order of preference: |
15 |
> [1] python3.9 |
16 |
> [2] python3.6 |
17 |
> [3] python3.8 (fallback) |
18 |
> [4] python3.7 (fallback) |
19 |
> [5] python2.7 (fallback) |
20 |
> |
21 |
> |
22 |
> Yet when I "emerge pyyaml" it seems to prefer 3.8 (see ? below): |
23 |
> |
24 |
> (cmd)root@dizzy ~ # emerge pyyaml |
25 |
> Calculating dependencies... done! |
26 |
> |
27 |
> >>> Verifying ebuild manifests |
28 |
> >>> |
29 |
> >>> Emerging (1 of 1) dev-python/pyyaml-5.4.1::gentoo |
30 |
> |
31 |
> * pyyaml-5.4.1.gh.tar.gz BLAKE2B SHA512 size ;-) ... |
32 |
> [ ok ] |
33 |
> >>> Unpacking source... |
34 |
> >>> Unpacking pyyaml-5.4.1.gh.tar.gz to |
35 |
> >>> /tmp/portage/dev-python/pyyaml-5.4.1/work Source unpacked in |
36 |
> >>> /tmp/portage/dev-python/pyyaml-5.4.1/work |
37 |
> >>> Preparing source in |
38 |
> >>> /tmp/portage/dev-python/pyyaml-5.4.1/work/pyyaml-5.4.1 ... |
39 |
> * Applying pyyaml-5.1-cve-2017-18342.patch ... |
40 |
> [ ok ] |
41 |
> >>> Source prepared. |
42 |
> >>> Configuring source in |
43 |
> >>> /tmp/portage/dev-python/pyyaml-5.4.1/work/pyyaml-5.4.1 ... |
44 |
> ? * Using python3.8 in global scope |
45 |
> ? * python3_8: running distutils-r1_run_phase python_configure_all |
46 |
> |
47 |
> >>> Source configured. |
48 |
> |
49 |
> ^C |
50 |
> |
51 |
> Exiting on signal 2 |
52 |
> |
53 |
> >>> Compiling source in |
54 |
> >>> /tmp/portage/dev-python/pyyaml-5.4.1/work/pyyaml-5.4.1 ... |
55 |
> ^Csandbox:stop caught signal 2 in pid 8217 |
56 |
> Sandboxed process killed by signal: Interrupt |
57 |
> * The ebuild phase 'die_hooks' has been killed by signal 2. |
58 |
> |
59 |
> * Messages for package dev-python/pyyaml-5.4.1: |
60 |
> * Log file: |
61 |
> /var/log/portage/dev-python:pyyaml-5.4.1:20210307-183833.log |
62 |
> |
63 |
> Q: Is it reasonable to simply remove everything other than 3.9 and |
64 |
> some version of 2.7? |
65 |
> |
66 |
> Trying to build 3.9 for one of my co-workers was hell, we ended up |
67 |
> using 3.8. Would it make more sense to remove 3.9? |
68 |
> |
69 |
> Not entirely sure why I have so many versions of python left behind |
70 |
> by upgrades. |
71 |
|
72 |
Have you tried: |
73 |
|
74 |
eselect python cleanup |
75 |
emerge --depclean -v -p |
76 |
emerge @preserved-rebuild -v -a |
77 |
|
78 |
I don't have any python targets specified and on a (mostly) stable system I |
79 |
get: |
80 |
|
81 |
$ /usr/bin/python --version |
82 |
Python 3.8.7 |
83 |
|
84 |
$ eselect python list |
85 |
Available Python interpreters, in order of preference: |
86 |
[1] python3.8 |
87 |
[2] python3.9 (fallback) |
88 |
|
89 |
$ ls -al /usr/bin/python |
90 |
lrwxrwxrwx 1 root root 13 Feb 13 09:04 /usr/bin/python -> python-exec2c |
91 |
|
92 |
$ emerge -1Dvp pyyaml |
93 |
|
94 |
These are the packages that would be merged, in order: |
95 |
|
96 |
Calculating dependencies... done! |
97 |
[ebuild N ] dev-python/pyyaml-5.4.1::gentoo USE="libyaml -examples - |
98 |
test" PYTHON_TARGETS="python3_8 (-pypy3) -python3_7 -python3_9" 170 KiB |
99 |
|
100 |
Total: 1 package (1 new), Size of downloads: 170 KiB |
101 |
|
102 |
It would use PYTHON_TARGETS="python3_8" which is the default on this system, |
103 |
since I have not modified my python settings. |