Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python 3.9 not showing in eselect python list
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
user7719
n00b
n00b


Joined: 19 Feb 2021
Posts: 73

PostPosted: Tue Aug 20, 2024 8:33 am    Post subject: Python 3.9 not showing in eselect python list Reply with quote

Hi,

I have some python scripts that require Python 3.9.

I have installed it:

Code:
sudo emerge -va python:3.9

 * IMPORTANT: 34 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


 * IMPORTANT: 2 config files in '/etc/portage' need updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 1.43 s (backtrack: 0/20).

[ebuild   R    ] dev-lang/python-3.9.19_p3:3.9::gentoo  USE="bluetooth ensurepip gdbm ncurses readline sqlite ssl -build -debug -examples -pgo -test -tk -valgrind -verify-sig" 0 KiB


But it isn't selectable:

Code:
sudo eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.11
  [2]   python3.12


Ideally I'd only want to select it in the terminal I'm using to execute the python scripts.

How can I do this?
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1901

PostPosted: Tue Aug 20, 2024 12:30 pm    Post subject: Reply with quote

Wrong tool for the task. Instead of trying to manipulate via the, obsolete, eselect python command, just call the scripts with python3.9 directly. Do this either on the command-line or in their bangpath or a wrapper script.
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1712
Location: Germany

PostPosted: Tue Aug 20, 2024 1:03 pm    Post subject: Reply with quote

Quote:
* IMPORTANT: 34 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.


* IMPORTANT: 2 config files in '/etc/portage' need updating.
* See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
* sections of the emerge man page to learn how to update config files.

Please do that to avoid any future or even current problems.
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
zdavatz
n00b
n00b


Joined: 20 Feb 2006
Posts: 16

PostPosted: Wed Sep 18, 2024 6:28 pm    Post subject: Re: Python 3.9 not showing in eselect python list Reply with quote

user7719 wrote:
Hi,

I have some python scripts that require Python 3.9.

I have installed it:

Code:
sudo emerge -va python:3.9

 * IMPORTANT: 34 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


 * IMPORTANT: 2 config files in '/etc/portage' need updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 1.43 s (backtrack: 0/20).

[ebuild   R    ] dev-lang/python-3.9.19_p3:3.9::gentoo  USE="bluetooth ensurepip gdbm ncurses readline sqlite ssl -build -debug -examples -pgo -test -tk -valgrind -verify-sig" 0 KiB


But it isn't selectable:

Code:
sudo eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.11
  [2]   python3.12


Ideally I'd only want to select it in the terminal I'm using to execute the python scripts.

How can I do this?


You need to update dev-lang/python-exec then it will show up.
Back to top
View user's profile Send private message
Phoenix591
Guru
Guru


Joined: 17 Sep 2007
Posts: 493

PostPosted: Thu Sep 19, 2024 12:25 am    Post subject: Re: Python 3.9 not showing in eselect python list Reply with quote

zdavatz wrote:


You need to update dev-lang/python-exec then it will show up.

no it won't. 3.9 was already removed from python-exec.


Just need to specify 3.9 in the shebangs ( and update them to a new python version when you have time). #!/usr/bin/python3.9
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum