Gentoo Archives: gentoo-user

From: Steven Lembark <lembark@×××××××.com>
To: gentoo-user@l.g.o
Cc: lembark@×××××××.com
Subject: Re: [gentoo-user] Q: What is "python-exec2c"? Why would "python3" dispatched through it not see an installed copy of pyyaml?
Date: Sun, 07 Mar 2021 16:00:24
Message-Id: 20210307110016.09c64f5a.lembark@wrkhors.com
In Reply to: Re: [gentoo-user] Q: What is "python-exec2c"? Why would "python3" dispatched through it not see an installed copy of pyyaml? by David Haller
1 On Sun, 7 Mar 2021 00:09:47 +0100
2 David Haller <gentoo@×××××××.de> wrote:
3
4 > Hello,
5 >
6 > On Sat, 06 Mar 2021, Steven Lembark wrote:
7 > >Question then is why "python-exec2c" dispatched via a symlink from
8 > >"python3" would fail to see the installed copy of pyyaml (or how
9 > >should I check with modules are avalable via "python3")?
10 > [..]
11 > >I think that pyyaml is installed:
12 > >
13 > >* dev-python/pyyaml
14 > > Latest version available: 5.4.1
15 > > Latest version installed: 5.4.1
16 > > Size of files: 170 KiB
17 > > Homepage: https://pyyaml.org/wiki/PyYAML
18 > > https://pypi.org/project/PyYAML/ https://github.com/yaml/pyyaml
19 > > Description: YAML parser and emitter for Python License:
20 > > MIT
21 >
22 > Check with 'eix dev-python/pyyaml' or 'equery uses dev-python/pyyaml'
23 > for what python versions that module is actually installed for and
24 > compare that with the default python3 version (check 'python3
25 > --version')
26
27 I believe there isn't any PYTHON_TARGET-ish setting on the system:
28
29 $ grep PYTHON_TARGET /etc/portage/make.conf /etc/portage/package.use/*
30 /etc/portage/make.conf:#PYTHON_TARGETS="python3_7 python2_7"
31 /etc/portage/package.use/dizzy:#*/* PYTHON_TARGETS: python3_6 python3_7
32 /etc/portage/package.use/dizzy~:#*/* PYTHON_TARGETS: python3_6 python3_7
33
34 > You probably need to re-emerge dev-python/pyyaml if PYTHON_TARGETS has
35 > changed. You probably have it installed just for one target (which is
36 > not your current default python3).
37
38
39
40 > $ equery uses dev-python/pyyaml
41 > [..]
42 > + + python_targets_python3_7 : Build with Python 3.7
43 > + + python_targets_python3_8 : Build with Python 3.8
44 > - - python_targets_python3_9 : Build with Python 3.9
45 > [..]
46 >
47 > So I have it installed for python 3.7.x and 3.8.x ...
48 >
49 > HTH,
50 > -dnh
51 >
52
53 $ equery uses dev-python/pyyaml
54 [ Legend : U - final flag setting for installation]
55 [ : I - package is installed with flag ]
56 [ Colors : set, unset ]
57 * Found these USE flags for dev-python/pyyaml-5.4.1:
58 U I
59 - - examples : Install examples, usually source code
60 + + libyaml : enable support for C implementation using
61 libyaml
62 - - python_targets_python3_7 : Build with Python 3.7
63 + + python_targets_python3_8 : Build with Python 3.8
64 - - python_targets_python3_9 : Build with Python 3.9
65 - - test : Enable dependencies and/or preparations
66 necessary to run tests (usually controlled by
67 FEATURES=test but can be toggled independently)
68 (ins)lembark@dizzy ~ $ eselect python list
69 Available Python interpreters, in order of preference:
70 [1] python3.9
71 [2] python3.6
72 [3] python3.8 (fallback)
73 [4] python3.7 (fallback)
74 [5] python2.7 (fallback)
75
76 $ python3 --version;
77 Python 3.9.1
78
79
80 Q: If don't have PYTHON_TARGETS set
81
82 Given that I installed it yesterday when the makefile told me
83 about pyyaml not being installed, there aren't any TARGETS set
84 (both commented), python3 appears to be python-3.9...
85
86 Q: Why would emerge pyyaml install the pacakge for a non-target
87 python version that isn't the one linked via python3?
88
89 Q: Is this related to the fact that I'm not actually checking
90 python but a wrapper named "python-exec2c":
91
92 $ ls -l /usr/bin/python3
93 lrwxrwxrwx 1 root root 13 Oct 20 10:46 /usr/bin/python3 -> python-exec2c
94
95
96 i.e., could the wrapper be mis-diagnosing the correct python
97 version at install time?
98
99 Q: Is there any reasonable way to have a single version of python
100 installed so that I get out of this maze? Previous python
101 target advice left me with one machine being re-installed and
102 I'd rather not have my server disabled at this point.
103
104 Thanks
105
106
107
108 --
109 Steven Lembark
110 Workhorse Computing
111 lembark@×××××××.com
112 +1 888 359 3508

Replies