Gentoo Archives: gentoo-user

From: cal <cal@×××××××××.technology>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] python mess - random winge!
Date: Tue, 05 Jul 2022 05:58:36
Message-Id: be907d7e-440b-62e7-a200-0f2016696e19@mail.meme.technology
In Reply to: [gentoo-user] python mess - random winge! by William Kenworthy
1 On 7/4/22 22:04, William Kenworthy wrote:
2 > I synced portage a couple of days now and now my systems are rebuilding
3 > python modules for 3.10 without any input from me (prior to this 3.10
4 > was on the system but wasn't picked up by applications.)  This is
5 > breaking non portage apps like homeassistant which are still not fully
6 > 3.10 safe - ok that's sort of expected and in this case will be fixed,
7 > but I cant find anything definitive on the task of "I want to control
8 > which python is used" and when to update.
9
10 As Nikos mentioned in another reply, you should pay attention to the
11 eselect news items as python upgrades are usually announced weeks in
12 advance.
13
14 >
15 > I eventually found that changing the order in python-exec.conf helped on
16 > the homeassistant system.
17
18 > There is a LOT of out of date documentation
19 > out there, particularly with eselect being used but is actually not used
20 > with python anymore (why? - from a user point of view having consistent
21 > access to configuration is a no brainer!)
22
23 I don't see any deprecation notice on
24 https://packages.gentoo.org/packages/app-eselect/eselect-python, but
25 someone could correct me.
26
27 > - so how can one get python to
28 > behave reliably and override its automatic get things wrong installation
29 > system?  Is manually editing python-exec.conf the way (which seems to
30 > get overwritten - shouldn't that be a protected config file then?)
31
32 The python package supports installing multiple versions to different
33 slots. The easiest way I've found to run python software that depends
34 on a specific version, without mucking around with global python
35 settings, is to install the relevant version (e.g. emerge python:3.8)
36 and then use venv to run that software in a virtual environment
37 (python3.8 -m venv .env; .env/bin/python something.py).
38
39 >
40 > BillK