Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Python] - python-exec
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
y351
Apprentice
Apprentice


Joined: 21 May 2017
Posts: 202

PostPosted: Sat Jan 25, 2025 3:50 pm    Post subject: [Python] - python-exec Reply with quote

Hi,
i am a little lost with python :
Code:

python -m venv ~/apps/python/venv
-bash: python3.4: command not found

Code:

ll /usr/bin/python*
lrwxrwxrwx. 1 root root    13 25 janv. 16:31 /usr/bin/python -> python-exec2c
lrwxrwxrwx. 1 root root    31 20 janv. 10:32 /usr/bin/python-argcomplete-check-easy-install-script -> ../lib/python-exec/python-exec2
lrwxrwxrwx. 1 root root    31 25 janv. 16:31 /usr/bin/python-config -> ../lib/python-exec/python-exec2
-rwxr-xr-x. 1 root root 18552 25 janv. 16:31 /usr/bin/python-exec2c
lrwxrwxrwx. 1 root root    13 25 janv. 16:31 /usr/bin/python3 -> python-exec2c
lrwxrwxrwx. 1 root root    31 25 janv. 16:31 /usr/bin/python3-config -> ../lib/python-exec/python-exec2
-rwxr-xr-x. 1 root root 14344 10 déc.  10:01 /usr/bin/python3.11
-rwxr-xr-x. 1 root root  2971 10 déc.  10:00 /usr/bin/python3.11-config
-rwxr-xr-x. 1 root root 14344 20 janv. 09:55 /usr/bin/python3.12
-rwxr-xr-x. 1 root root  2992 20 janv. 09:55 /usr/bin/python3.12-config
-rwxr-xr-x. 1 root root 14344 20 janv. 10:04 /usr/bin/python3.13
-rwxr-xr-x. 1 root root  3101 20 janv. 10:04 /usr/bin/python3.13-config


Code:

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


Code:

/etc/python-exec/python-exec.conf
python3.12
python3.13
python3.11
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54766
Location: 56N 3W

PostPosted: Sat Jan 25, 2025 4:19 pm    Post subject: Reply with quote

y351,

Code:
... ~/apps/python/venv
You have something in your home directory trying to use python-3.4.
That was removed many years ago now.
The default in Gentoo is now python-3.12
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
y351
Apprentice
Apprentice


Joined: 21 May 2017
Posts: 202

PostPosted: Sat Jan 25, 2025 7:02 pm    Post subject: Reply with quote

That is why i wonder why there is a symbolic link of :
Code:
/usr/bin/python -> python-exec2c

How to clean this properly?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23046

PostPosted: Sat Jan 25, 2025 7:12 pm    Post subject: Reply with quote

That link is normal. Why are you trying to point modern Python to a virtualenv from so long ago?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54766
Location: 56N 3W

PostPosted: Sat Jan 25, 2025 7:17 pm    Post subject: Reply with quote

y351,

That's for packages installed by portage.
python-exec is a wrapper that ensures that portage installed python packages are run with the right python version.

eselect python sets the preferences for non portage managed python packacges.
It does not affect anything else.

If the shebang in your python package calls python-3.4, that's what it will try to use but its not installed, so it will fail.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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