因爲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)