Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
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 22:04:54
Message-Id: 20210307220439.47523cf7@digimed.co.uk
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 Steven Lembark
1 On Sun, 7 Mar 2021 11:00:16 -0500, Steven Lembark wrote:
2
3 > I believe there isn't any PYTHON_TARGET-ish setting on the system:
4 >
5 > $ grep PYTHON_TARGET /etc/portage/make.conf
6 > /etc/portage/package.use/*
7 > /etc/portage/make.conf:#PYTHON_TARGETS="python3_7 python2_7"
8 > /etc/portage/package.use/dizzy:#*/* PYTHON_TARGETS: python3_6 python3_7
9 > /etc/portage/package.use/dizzy~:#*/* PYTHON_TARGETS: python3_6 python3_7
10
11 There is, just not set by you. There is still the default setting, which
12 emerge --info will show you is 3.8.
13
14 > $ equery uses dev-python/pyyaml
15 > [ Legend : U - final flag setting for installation]
16 > [ : I - package is installed with flag ]
17 > [ Colors : set, unset ]
18 > * Found these USE flags for dev-python/pyyaml-5.4.1:
19 > U I
20 > - - examples : Install examples, usually source
21 > code
22 > + + libyaml : enable support for C implementation
23 > using libyaml
24 > - - python_targets_python3_7 : Build with Python 3.7
25 > + + python_targets_python3_8 : Build with Python 3.8
26 > - - python_targets_python3_9 : Build with Python 3.9
27 > - - test : Enable dependencies and/or
28 > preparations necessary to run tests (usually controlled by
29 > FEATURES=test but can be toggled
30 > independently) (ins)
31
32 libyaml is built for python 3.8 only, as that is the setting you have in
33 place.
34
35 > lembark@dizzy ~ $ eselect python list
36 > Available Python interpreters, in order of preference:
37 > [1] python3.9
38 > [2] python3.6
39 > [3] python3.8 (fallback)
40 > [4] python3.7 (fallback)
41 > [5] python2.7 (fallback)
42 >
43 > $ python3 --version;
44 > Python 3.9.1
45
46 But you have chosen a different default version of Python. That leaves
47 you two choices:
48
49 1) use eselect to set your default python to 3.8
50 2) Add python_39 to PYTHON_TARGETS
51 3) Explicitly call python38 in the shebang line of the affected script.
52
53
54 --
55 Neil Bothwick
56
57 QOTD:
58 The only easy way to tell a hamster from a gerbil is that the
59 gerbil has more dark meat.

Replies