Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
app-admin/ansible & /usr/bin/python issue here
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3661

PostPosted: Sat May 25, 2024 3:25 pm    Post subject: app-admin/ansible & /usr/bin/python issue here Reply with quote

pyrhon-3.[10,11,12].
default is 3.11
ansible is installed for 3.11

However, calling ansible here warns:
Code:
[WARNING]: Platform linux on host node1 is using the discovered Python
interpreter at /usr/bin/python3.12, but future installation of another Python
interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.16/reference_appendices/interpreter_discovery.html for more information.

The only workaround found here is to define ansible_python_interpreter=/usr/bin/python3.11.
This inhibits the previous warning.
So /usr/bin/python doesn't seem recognized.

Any experience to share?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
freke
Veteran
Veteran


Joined: 23 Jan 2003
Posts: 1000
Location: Somewhere in Denmark

PostPosted: Sat May 25, 2024 4:41 pm    Post subject: Re: app-admin/ansible & /usr/bin/python issue here Reply with quote

CaptainBlood wrote:
pyrhon-3.[10,11,12].
default is 3.11
ansible is installed for 3.11

However, calling ansible here warns:
Code:
[WARNING]: Platform linux on host node1 is using the discovered Python
interpreter at /usr/bin/python3.12, but future installation of another Python
interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.16/reference_appendices/interpreter_discovery.html for more information.

The only workaround found here is to define ansible_python_interpreter=/usr/bin/python3.11.
This inhibits the previous warning.
So /usr/bin/python doesn't seem recognized.

Any experience to share?

Thks 4 ur attention, interest & support.

Reading https://docs.ansible.com/ansible-core/2.16/reference_appendices/interpreter_discovery.html values seems to should be
Quote:
Use one of the following values:

auto_legacy :
Detects the target OS platform, distribution, and version, then consults a table listing the correct Python interpreter and path for each platform/distribution/version. If an entry is found, and /usr/bin/python is absent, uses the discovered interpreter (and path). If an entry is found, and /usr/bin/python is present, uses /usr/bin/python and issues a warning. This exception provides temporary compatibility with previous versions of Ansible that always defaulted to /usr/bin/python, so if you have installed Python and other dependencies at /usr/bin/python on some hosts, Ansible will find and use them with this setting. If no entry is found, or the listed Python is not present on the target host, searches a list of common Python interpreter paths and uses the first one found; also issues a warning that future installation of another Python interpreter could alter the one chosen.

auto(default in 2.12)
Detects the target OS platform, distribution, and version, then consults a table listing the correct Python interpreter and path for each platform/distribution/version. If an entry is found, uses the discovered interpreter. If no entry is found, or the listed Python is not present on the target host, searches a list of common Python interpreter paths and uses the first one found; also issues a warning that future installation of another Python interpreter could alter the one chosen.

auto_legacy_silent
Same as auto_legacy, but does not issue warnings.

auto_silent
Same as auto, but does not issue warnings.

Here is running ansible for python3_12 and with
Code:
ns ~ # python -V
Python 3.12.3
Ansible does not produce any warning for me.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3661

PostPosted: Sat May 25, 2024 10:37 pm    Post subject: Reply with quote

Is 3.13 installed?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3191

PostPosted: Sat May 25, 2024 11:05 pm    Post subject: Reply with quote

Does /usr/bin/python actually point to python3.11 on your system?

Anyway, it's a warning telling you that the interpreter in use is not set in stone AKA things that used to work might be broken now and things that work now might potentially break in the future without you explicitly taking an action to change the interpreter.
In practice it's not that big deal really... I think python is like 50 years old by now, it had a lot of time to mature, changes happen slowly,so things tend to work the same over multiple versions. You're not likely to encounter any problems because of that.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21856

PostPosted: Sat May 25, 2024 11:31 pm    Post subject: Reply with quote

szatox wrote:
I think python is like 50 years old by now, it had a lot of time to mature, changes happen slowly,so things tend to work the same over multiple versions. You're not likely to encounter any problems because of that.
Not quite 50 yet. Wikipedia points to an archive.org copy of a February 1991 posting as the first release, so about 33 years.

That said, other than the Python2 -> Python3 transition, which nobody wants to go through again, Python upgrades have indeed been very compatible.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3191

PostPosted: Sat May 25, 2024 11:47 pm    Post subject: Reply with quote

Damn... I though it started somewhere in 70's. Fortunately, in computers' time scale 90's it's still like antiquity, so my my point stands, even if it shook a little :lol:
I wonder which language I mixed it up with though...
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
freke
Veteran
Veteran


Joined: 23 Jan 2003
Posts: 1000
Location: Somewhere in Denmark

PostPosted: Sun May 26, 2024 5:56 am    Post subject: Reply with quote

szatox wrote:
Damn... I though it started somewhere in 70's. Fortunately, in computers' time scale 90's it's still like antiquity, so my my point stands, even if it shook a little :lol:
I wonder which language I mixed it up with though...

Pascal maybe? https://en.wikipedia.org/wiki/Pascal_(programming_language)

I remember that from my schooldays mid 80's
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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