How do I upgrade the Python installation in Windows 10?

To upgrade the Python installation in Windows 10, you can use the pip package manager. First, open the command prompt or PowerShell and run the following command to upgrade pip:

python -m pip install --upgrade pip

Watch a course Python - The Practical Guide

Then, you can use pip to upgrade Python by running the following command:

pip install --upgrade python

Please note that this will upgrade the version of Python that is associated with the pip executable, which may not be the version of Python that is used by default in the command prompt or PowerShell. If you want to upgrade the default version of Python, you will need to download the latest version of Python from the official website and run the installer.

In case of any issues with the above commands, try running the command prompt as an administrator.