因为python 3 已经是目前稳定,且是未来版本版本。新学者能够直接从python3入手学习。可是目前还有不少企业级应用使用的是python 2,可能还得要维护。因此,咱们在本地windows中能够安装python多版本,进行熟悉。python
官网地址:https://www.python.orgwindows
安装时,勾选“Add Python 3.x to PATH” 或者安装后配置环境变量微信
将安装目录下的 C:\Python35\python.exe 更名为 python3.exeide
将python 3 中的 C:\Python35\Scripts\pip.exe 删掉学习
C:\WINDOWS\System32>pip3 Fatal error in launcher: Unable to create process using '"'
若是出现上方错误提示,则从新更新python3 的pip 便可,命令以下测试
C:\WINDOWS\System32>python3 -m pip install -U pip Collecting pip Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB) 35% |███████████▏ | 419kB 117kB/s eta 0:00:07 Successfully installed pip-8.1.2
C:\WINDOWS\System32>python -V Python 2.7.9 C:\WINDOWS\System32>python3 -V Python 3.5.2 C:\WINDOWS\System32>pip -V pip 1.5.6 from C:\Python27\lib\site-packages (python 2.7) C:\WINDOWS\System32>pip3 -V pip 8.1.2 from c:\python35\lib\site-packages (python 3.5) C:\WINDOWS\System32>where python C:\Python27\python.exe C:\WINDOWS\System32>where python3 C:\Python35\python3.exe
python -m pip install --upgrade pipspa
C:\Users\Administrator>pip3 --version pip 1.5.6 from D:\360YP\VM\python2.7\lib\site-packages (python 2.7) C:\Users\Administrator>python -m pip --version pip 1.5.6 from D:\360YP\VM\python2.7\lib\site-packages (python 2.7) C:\Users\Administrator>python -m pip install --upgrade pip Downloading/unpacking pip from https://pypi.python.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408 f196358da3/pip-9.0.1-py2.py3-none-any.whl#md5=297dbd16ef53bcef0447d245815f5144 Installing collected packages: pip Found existing installation: pip 1.5.6 Uninstalling pip: Successfully uninstalled pip Successfully installed pip Cleaning up... C:\Users\Administrator>pip --version pip 9.0.1 from D:\360YP\VM\python2.7\lib\site-packages (python 2.7) C:\Users\Administrator>pip3 --version pip 9.0.1 from d:\360yp\vm\python35\lib\site-packages (python 3.5)