WIN7 2个Python版本共存如何调用

Win7已经安装了2个不同版本的Python,Python2.7 和Python3.7。
并且都已加入到了PATH环境变量。
PATH值

D:\projects\php>PATH
PATH=C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle
\Java\javapath;C:\Program Files (x86)\Python37-32\Scripts\;C:\Program Files (x86
)\Python37-32\;C:\Program Files (x86)\NetSarang\Xshell 6\;C:\Windows\system32;C:
\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:
\PHP73;C:\Program Files\PuTTY\;C:\ProgramData\ComposerSetup\bin;C:\Program Files
\Git\cmd;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files
\MySQL\MySQL Shell 8.0\bin\;C:\Users\Administrator\AppData\Roaming\Composer\vend
or\bin;C:\Users\Administrator\AppData\Roaming\npm

D:\projects\php>

调用Python3

D:\projects\php>py -3
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Inte
l)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

                                                                                                                                                                                                                                                                                                                                      

调用Python2

D:\projects\php>py -2
Python 2.7.16 (v2.7.16:413a49145e, Mar  4 2019, 01:37:19) [MSC v.1500 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值