在安装了3.5版本之后,如何从Win7 Powershell启动Python 2.7?
在安装了3.5版本之后,如何从Win7 Powershell启动Python 2.7?
我刚刚在一个同时安装了Python 2.7的win7操作系统上安装了Python 3.5.1。现在在Powershell中输入“python”会启动3.5.1版本。以前是启动2.7版本。
现在如何启动2.7版本呢?输入“python27”或“Python27”、“python2.7”或“Python2.7”都不行。我的用户环境变量中有“C:\Python;”。
在阅读了这个讨论之后:Python 2 and 3 from Powershell
和参考的文章之后:
http://windowsitpro.com/powershell/take-charge-environment-variables-powershell
我是否正确地理解了,Powershell只能使用其中一个版本,也就是说,如果我想在Powershell中使用2.7版本,我必须激活和停用它?
是否有一种简单地输入“python27”来启动2.7版本的方法?
如果有帮助的话,这是我的用户环境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