Python環境配置及問題(windows)

windows下:

使用vs2013作爲IDE,配置參照http://www.bkjia.com/Pythonjc/883437.html


python安裝包管理:

先安裝python,我安裝的是python3.5.2

然後安裝easy_install,會自動在python的安裝路徑下生成scripts目錄,相關的可執行文件都放在這個目錄中,將該目錄添加到環境變量中。

easy_install pip ->安裝pip工具

pip install numpy ->通過pip安裝numpy包


(安裝的python在2.7或者3.4及其更新的版本,其中自帶了pip,但是比較老。最好是用easy_install來安裝pip,版本比較新)





在安裝numpy時報錯:

".............

pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError:HTTPSConnectionPool<host='pypi.python.org',port=443>:Read timed out

You are using pip version 8.1.1,however version 9.0.1 is avaliable.

You should consider upgrading via the 'python -m pip install --upgrade pip' command "

按照上面的錯誤提示,再輸入python -m pip install --upgrade pip,對pip進行更新


繼續安裝numpy:pip install numpy 

又報錯:

these packages do not match the hashes from the requirments file......”

原因見http://stackoverflow.com/questions/40183108/python-packages-hash-not-matching-whilst-installing-using-pip

大意就是說更新一個包之前沒有先更新hash值

帖子裏給出的解決辦法爲:pip install --no-cache-dir numpy

發佈了44 篇原創文章 · 獲贊 16 · 訪問量 9萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章