I just installed python 3.5.1 on a win7 OS which also has python 2.7. Typing "python" into the Powershell now launches 3.5.1. Previously that launched 2.7.
How do I launch python 2.7 now? Typing "python27" or "Python27", "python2.7", "Python2.7" doesn't do it. I do have "C:\Python;" in my user Environment variable.
After reading this discussion: Python 2 and 3 from Powershell and the referenced article: http://windowsitpro.com/powershell/take-charge-environment-variables-powershell
Am I correct that Powershell can only do one or the other, i.e. if I want to use 2.7 in Powerhell I have to activate and deactivate it?
Is there is a way to simply type "python27" to launch 2.7?
If it is helpful, this is my user env PATH:
C:\Users\patrick\AppData\Local\Programs\Python\Python35-32\Scripts\;
C:\Users\patrick\AppData\Local\Programs\Python\Python35-32\;
C:\ProgramData\Oracle\Java\javapath;
C:\Program Files\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files (x86)\Windows Live\Shared;
C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;
C:\Program Files (x86)\Common Files\Roxio Shared\12.0\DLLShared\;
C:\Program Files\WIDCOMM\Bluetooth Software\;
C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;
C:\Program Files (x86)\QuickTime\QTSystem\;
C:\Program Files (x86)\Skype\Phone\;
C:\Program Files\MATLAB\R2015b\bin;
C:\ffmpeg\bin;
C:\Python27;
C:\SQLite3
PATHentry, while python.exe from Python 2.7 is found in the second to last entry. You can usepy -2to run Python 2.7, or manually modify your system and userPATHvalues to prioritize 2.7 over 3.5. Note that your per-user value gets concatenated to the end of the system value when you log on.#!/usr/bin/python3).NoDefaultCurrentDirectoryInExePath. That's why it's.\idleinstead ofidle. But really there's no need to use the batch file. You can usepyw -3 -m idlelib. For Python 2 usepyw -2 -m idlelib.idle; you have to run the idle.py script since Python 2 doesn't grok__main__.pyscripts.