Create Python Alias for Python 3 with Notepad in PowerShell on Windows - DevPops-Inc/windows GitHub Wiki

• Press the Windows key, type “powershell” and select “Run as administrator.”
image

• Type python and press the Enter key to sanity check that python gets you into the Python interactive shell.
image

• Type exit() or quit() and press the Enter key to exit the Python interactive shell.
image

• Type New-Item -ItemType file python3.ps1 and press the Enter key to create an python3.ps1 file.
image

• Type notepad python3.ps1 and press the Enter key to open the python3.ps1 file in the Notepad application.
image

• Type “python”.
image

• Expand the “File” menu and select “Save” or press the Ctrl and S keys to save.
image

• Close the Notepad application.
image

• Press the Windows key, type “env” and select “Open.”
image

• Select “Environment Variables…”
image

• Select “Path” in the “User variables for < user >” window and click “Edit.”
image

• Select “New.”
image

• Type “C:\Windows\System32\python3.ps1”.
image

• Press “Move Up” multiple times until “C:\Windows\System32\python3.ps1” is at the top.
image

• Select “OK.”
image

• Select “OK” again.
image

• Select “OK” again.
image

• Return to PowerShell, type python3 and press the Enter key to you will get into the Python interactive shell
image

⚠️ **GitHub.com Fallback** ⚠️