As, others have said -- you could just add the python directory containing the executable to the PATH... I just want to give this as an extra option.
This is a general solution for any type of program or executable you'd like to run with a custom name.
I created an "Aliases" folder in my account C:\Users\{Your Account Name}\Aliases
.
In that folder, I keep useful .bat scripts.
Just make a script called "python" and, in that script, put the path of your python.exe.
So, for example, this would be your entire bat file (named python.bat
):
@echo off
echo .
C:\Python36\python.exe
if you want to be able to add args to your command, do the same but replace the execution line with the follows:
C:\Python36\python.exe %1 %2 %3 %4 %5 %6
That will give you the ability to add up to 6 arguments. This is helpful if you're doing python pip commands directly from the command line.
After you create this file, simply add the folder to your PATH variable
(Start -> Type Edit the Environment Variables for your account -> Click PATH -> click Edit -> Append the location of your "Aliases" folder to the PATH, using a semi-colon to separate it from the rest. -> Click OK and OK once again.) From now on, you don't have to worry about the PATH variable, just add more bat files and you're good to go!