You have to update your windows PATH variable to add 3 directories. Just add this to the end of your path: c:\users\chuck\AppData\Local\Programs\Python\Python312\;c:\users\chuck\AppData\Local\Programs\Python\Python312\Lib;c:\users\chuck\AppData\Local\Programs\Python\Python312\Scripts
I had to add all 3 dirs to get PIP and the modules to work correctly.
Fix your path with a custom autoexec.bat
I also have a DOS cmd shortcut which puts me in my Python projects dir, and calls a custom c:\apps\autoexec.bat file.
In the shortcut this goes in the Target field: C:\Windows\System32\cmd.exe /k c:\apps\autoexec.bat
This will launch cmd.exe and execute the autoexec.bat file and stay in the cmd window.
My partial autoexec.bat file also sets up the PYTHONPATH just in case.
set PYTHONPATH=c:\users\YOURNAME\AppData\Local\Programs\Python\Python312
echo Path=%path%
echo PYTHONPATH=%PYTHONPATH%
Fix your path in Windows system config
- Go to Control Panel.
- Search for “path” without the double quotes.
- You should see something like “system” or “Edit the system environment variables”. Click that.
- A window will pop up. Cick the Advanced tab.
- On the bottom of the Advanced tab click “Environment variables” button.
- Under the area “User variables for YOURUSER” click the entry for Path, then click Edit button.
- Another window will pop up.
- Click New and add 3 entries total, one for each path I put above. Windows will string them together for you.
- Click OK. Click OK on Environment Variables.
- Close the System Properties window.
In my c:\apps directory I also have the TED.exe editor, Tiny editor, which is very small, and super handy packed with features! Get it here: TED Notepad