The PATH
environment variable appears to already include the correct paths for your Python installation. However, pip
might still be using the outdated path due to a corrupted or incorrect launcher. Here are steps to address this:
1. Remove the Old Python Path from PATH
Ensure that there are no outdated Python paths left in the PATH
variable. You can remove any reference to F:\Python\Python312
.
To edit the PATH
variable:
- Open the Control Panel.
- Go to System and Security > System.
- Click Advanced system settings.
- In the System Properties window, click the Environment Variables button.
- In the Environment Variables window, find and select the
PATH
variable in the System variables or User variables section and click Edit. - Look for any old Python paths (e.g.,
F:\Python\Python312
) and remove them. - Click OK to save changes and close all dialog boxes.
2. Reinstall pip
Reinstalling pip
can fix issues with the launcher.
- Open Command Prompt as Administrator.
- Navigate to the Scripts directory:
- Reinstall
pip
:
3. Directly Use Python to Call pip
As a temporary workaround, you can directly call pip
through Python:
4. Verify Python Installation
Ensure that the Python executable is correctly located at E:\Programs\Python\Python312\python.exe
and the pip
executable at E:\Programs\Python\Python312\Scripts\pip.exe
:
- Check Python executable:
- Check
pip
executable:
5. Fix Python Launcher (if installed)
If you have a Python launcher installed (usually found at C:\Windows\py.exe
), it might be using an old path. You can uninstall the launcher or update it to use the correct Python version.
To uninstall the Python launcher:
- Open Control Panel > Programs and Features.
- Find Python Launcher and uninstall it.
After following these steps, the pip
command should work correctly with your updated Python installation.