編者按:
學習python需要的是搭建一套可用的開發環境,在開發的過程中,windows因為很多編譯工具不能很好的去安裝支持編譯環境,所以會有很多絆腳的地方。本文嘗試在windows環境下面整理安裝一些比較難安裝的第三方模塊庫。以幫助更多的朋友學習之便。
1.python27和python33、python34、python35環境的同時並發:
在學習的過程中,有一些模塊在python2.7版本上還沒有兼容到python3版本,比如操作mysql的模塊MySQL。所以需要我們的在win下面並發的搭建多個版本的python環境。就我所了解目前生產環境下面使用python3.4版本的居多(除了使用python2版本之外),但為了嘗試python3版本的一些新特性和從版本2到3的過渡,所以這裡嘗試構建python3版本的3個版本,以供參考!
python各常用版本下載鏈接:
python2.7.11 win32:https://www.python.org/ftp/python/2.7.11/python-2.7.11.msi python2.7.11 win64:https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi python3.3.5 win32: https://www.python.org/ftp/python/3.3.5/python-3.3.5.msi python3.3.5 win64:https://www.python.org/ftp/python/3.3.5/python-3.3.5.amd64.msi python3.4.4 win32:https://www.python.org/ftp/python/3.4.4/python-3.4.4.msi python3.4.4 win64:https://www.python.org/ftp/python/3.4.4/python-3.4.4.amd64.msi python3.5.1 win32:https://www.python.org/ftp/python/3.5.1/python-3.5.1.msi python3.5.1 win64:https://www.python.org/ftp/python/3.5.1/python-3.5.1.amd64.msi
python版本安裝:
在安裝python各個版本的時候使用這樣目錄: 路徑 python運行程序重命名 path/Python27 python2.exe python27.exe pip2.exe pip27.exe easy_install2.exe easy_install27.exe path/Python33 python33.exe pip33.exe easy_install33.exe path/Python34 python34.exe pip34.exe easy_install34.exe path/Pyhon35 python3.exe python35.exe pip35.exe easy_install35.exe 環境變量設置: python27=D:\Program Files\Python27\;D:\Program Files\Python27\Scripts;D:\Program Files\Python27\Lib;D:\Program Files\Python27\Lib\site-packages;D:\Program Files\Python27\DLLs python33=D:\Program Files\Python33\;D:\Program Files\Python33\Scripts;D:\Program Files\Python33\Lib;D:\Program Files\Python33\Lib\site-packages;D:\Program Files\Python33\DLLs python34=D:\Program Files\Python34\;D:\Program Files\Python34\Scripts;D:\Program Files\Python34\Lib;D:\Program Files\Python34\Lib\site-packages;D:\Program Files\Python34\DLLs python35=D:\Program Files\Python35\;D:\Program Files\Python35\Scripts;D:\Program Files\Python35\Lib;D:\Program Files\Python35\Lib\site-packages;D:\Program Files\Python35\DLLs