ifIf you are using the windows powershellWindows PowerShell and not the command prompt, you can use the following code:
Set-Alias -Name python3 -Value python
or you can use the following code:
Set-Alias -Name pythonpython3 -Value "C:\Python39\python.exe"
Note that this is a temporary Alias for the current session, to make it permanent; you have to copy the above command into an empty text file and name it Profile.ps1 file and copy it to one of the following folders: if
if you are using Power ShellPowerShell 7:
{My Documents Folder}/PowerShell
if you are using Windows Power ShellPowerShell which comes by default in windowsWindows 10:
{My Documents Folder}/WindowsPowerShell
or inside the installation folder of PowerShell, which can be figured out by:
cd $PSHOME\