setx PATH "%PATH%;C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python312\;C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python312\Scripts\" /M
If you haven't installed Python yet, or are willing to reinstall, this is the most reliable way: add python to path windows 11
If Python is already installed but not working in your terminal, follow these steps to add it manually: setx PATH "%PATH%
Download the latest version from the official Python website. Run the installer. or are willing to reinstall
Before changing settings, you need the exact address of your Python folder. How To Add Python to PATH in Windows