On 3/29/23 10:46, Pranav Bhardwaj wrote:
Dear sir,
                I am Pranav Bhardwaj and I stuck in a problem. My problem is
that in my system I have python 3.11.2 but when I type python in my command
prompt, my command prompt show that python version 2.7.13 as a default. And
I can't be able to find python 2.7.13 in my system in any file

once you open that Olde Python that you can't find:

>>> import sys
>>> sys.executable

voila! you've found it.

 and I tried
various methods to set python 3.11.2 as a default but can't be able to do
so. I tried to change environment variables, try to find and delete python
2.7.13 , try to set python 3.11.2 as default, but I can't be able to do so.
So can you help me how can I solve this problem?

As noted elsewhere, for the python.org version, the Python Launcher exists for this purpose.

py --list

shows you which Pythons it knows about, and with a '*' which one is the default. You can instruct py which one should be default (for that you need to create an ini file), but it will otherwise choose the latest, so you shouldn't have the problem of it choosing 2.7 over 3.11 with the launcher.


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to