Create Python Alias for Python 3 with Notepad in PowerShell on Windows - DevPops-Inc/python GitHub Wiki
• Press the Windows key, type “powershell” and select “Run as administrator.”
•
• Type python
and press the Enter key to sanity check that python
gets you into the Python interactive shell.
•
• Type exit()
or quit()
and press the Enter key to exit the Python interactive shell.
•
• Type New-Item -ItemType file python3.ps1
and press the Enter key to create an python3.ps1
file.
•
• Type notepad python3.ps1
and press the Enter key to open the python3.ps1 file
in the Notepad application.
•
• Type “python”.
•
• Expand the “File” menu and select “Save” or press the Ctrl and S keys to save.
•
• Close the Notepad application.
•
• Press the Windows key, type “env” and select “Open.”
•
• Select “Environment Variables…”
•
• Select “Path” in the “User variables for < user >” window and click “Edit.”
•
• Select “New.”
•
• Type “C:\Windows\System32\python3.ps1”.
•
• Press “Move Up” multiple times until “C:\Windows\System32\python3.ps1” is at the top.
•
• Select “OK.”
•
• Select “OK” again.
•
• Select “OK” again.
•
• Return to PowerShell, type python3
and press the Enter key to you will get into the Python interactive shell
•