Python安裝Numpy和matplotlib的方法(推薦)
注意:
下載的庫(kù)名中cp27代表python2.7,其它同理。
在shell中輸入import pip; print(pip.pep425tags.get_supported())可以獲取到pip支持的文件名還有版本
================安裝Numpy====================
下載地址: https://pypi.python.org/pypi/numpy 類似 numpy-1.13.3-cp36-none-win_amd64.whl
下載好后將文件放到python安裝目錄下的scripts文件夾中如果python安裝正確的話這個(gè)文件夾中應(yīng)該還有pip和easy_install.
cmd下:E:/Python/Scripts>pip3 install numpy-1.13.3-cp36-none-win_amd64.whl
安裝成功就會(huì)提示 Successfully installed numpy-1.13.3
最后要檢驗(yàn)到底有沒(méi)有成功,可以通過(guò)在python中輸入import numpy,如果沒(méi)有提示異常,就說(shuō)明安裝成功
================安裝matplotlib====================
下載地址:https://pypi.python.org/pypi/matplotlib
下載文件:matplotlib-2.1.0-cp36-cp36m-win_amd64.whl (md5)
copy到python的Scripts目錄下,cmd進(jìn)入Scripts目錄,執(zhí)行:
pip3 install matplotlib-2.1.0-cp36-cp36m-win_amd64.whl
安裝numpy和matplotlib
安裝numpy
1、先下載python,配置好環(huán)境變量。
2、安裝pip:在python的Scripts安裝目錄下找到easy_install.exe通過(guò)此安裝pip。
3、下載對(duì)應(yīng)的numpy:https://pypi.python.org/pypi/numpy/注意一定要下載對(duì)應(yīng)的版本,我的是Python 3.5.0,所以我下的是numpy-1.11.0-cp35-none-win_amd64.whl (md5, pgp)(這里的cp35代表的版本,amd64說(shuō)的64位)
4、cmd cd到numpy-1.11.0-cp35-none-win_amd64.whl放置的文件夾中,輸入pip install numpy-1.11.0-cp35-none-win_amd64.whl即可看到numpy安裝成功。
如果在這個(gè)過(guò)程中出現(xiàn) You are using pip version 7.1.2, however version 8.1.2 is available這類似的錯(cuò)誤的話,首先進(jìn)入到easy_install的目錄 例如D:/Python27/Scripts
然后通過(guò)指令 easy_install.exe pip==8.1.2 最后安裝成功。
安裝matplotlib
1、下載對(duì)應(yīng)的matplotlib:https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.5.0/windows/
我下的是matplotlib-1.5.0-cp35-none-win_amd64.whl
2、和上面的一樣,cmd cd到matplotlib-1.5.0-cp35-none-win_amd64.whl放置的文件夾中,輸入pip installmatplotlib-1.5.0-cp35-none-win_amd64.whl即可看到matplotlib安裝成功。
以上這篇Python安裝Numpy和matplotlib的方法(推薦)就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持武林站長(zhǎng)站。
新聞熱點(diǎn)
疑難解答
圖片精選