To launch a Python program
myprog.py on Windows, you normally have to type
After installing the Python Launcher, you can just type
is governed by the shebang on the first line of
Don’t specify a shebang like
#!/usr/bin/python except for specific situations like GNU Radio scripts where you specifically want system Python in some (but not all) cases.
Windows Python Launcher Installation
Unless you use CPython directly (most people don’t, most people use something like Anaconda Python), so you need to install Python Launcher on Windows.
- Download the most recent launchwin*.amd64.msi
- double click the
.msifile to install Python Launcher.
- open a new Command Prompt and type
and verify your desired Python prompt is seen.
Now typing in Windows Command Prompt
myprog.py as expected.