On 3/29/23, Pranav Bhardwaj <pranavbhardwaj...@gmail.com> wrote: > 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.
Run the following command in the shell where.exe python Note the first directory where "python" is found. Edit both the system and the user environment variables to remove that directory from both the system and user "Path" environment variable. Open a new shell from Explorer, and confirm that "python" no longer runs Python 2. If "python" still runs Python 2, repeat this procedure. Next run the Python 3.11 installer again to modify the installation. On the second page, enable the option to add Python to the environment variables, and click "install". After it's done, open a new shell. Running "python" should start Python 3.11. Also "pip" should work. You should also be able to run Python using the "py" launcher and pip via "py -m pip". To ensure that that .py file association is correct, open the system settings app and navigate to "Apps" -> "Default Apps". Enter ".py" and ensure that it's associated with the Python app that has a rocket on its icon (i.e. Python's "py" launcher). Repeat this for ".pyw", ".pyz", and ".pyc". -- https://mail.python.org/mailman/listinfo/python-list