I am previously running python 2.7.11 on Windows 10.
Today, I downloaded and installed python 2.7.13, but the PowerShell version is still at 2.7.11:
python --version
Python 2.7.11
In PowerShell, Get-Command python | fl *
will tell you which Python executable it's finding and show you details about where it is.
Get-Command
earlier, and decide if you want to remove that.At the point of "Native Windows commands", it goes to the PATH
environment variable, a semi-colon separated list of path names, which get searched in order, looking for a matching executable file.
You can see the folders with:
$Env:PATH -split ';'
And you can watch PowerShell identify what to run for 'python' with the command
Trace-Command –Name CommandDiscovery –Expression {get-command python} -PSHost
So, to make Python 2.7.13 the one to launch, you could:
New-Alias -name python -Value C:\Python27\python.exe
, etc).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With