1.环境变量
2.在cmd 命令行中使用 py -2 使用python27
在 cmd 命令行中使用 py -3 使用python35
C:Users*****>py -3 Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
C:Users******>py -2 Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
3.使用pip时安装module
py -2 -m pip install xxx # python 27
py -3 -m pip install xxx # python 35