一、Windows下(兩種方法)
1. 安裝Python EDP_free并安裝pandas
??? ① 如果你沒有安裝python2.7,可以直接選擇安裝Python EDP_free,然后再安裝pandas等包就行 :
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Python EDP_free 網址: ? http://epdfree-7-3-2.software.informer.com/7.3/
?? ? ? ? ? ? ? ? ?? 雙擊epd_free-7.3-2-win-x86.msi 進行安裝,沒有什么好講的,各種點擊下一步即可。
?
? ? ② 安裝完成后運行cmd(命令提示符),輸入python查看版本;如果出現ImportError: No module named site錯誤提示,請配置環境變量中的Path:
Python安裝目錄/
Python安裝目錄/scripts/
?? ③ 安裝pip
????? 在cmd中進入到get-pip.py的相應目錄下輸入:get-pip.py
?? ④ 安裝pandas
????????????????????? pandas-0.17.0-cp27-none-win32.whl 網址: https://pypi.python.org/pypi/pandas/0.17.0/
??????? 在cmd中進入到pandas-0.17.0-cp27-none-win32.whl的相應目錄下執行如下命令
?
pip install pandas-0.17.0-cp27-none-win32.whl
?? ⑤ 測試是否安裝成功
??? ? 在cmd中輸入如下命令
ipython --pylab
import pandas plot(arange(10))
???????????????? 出現以下圖片即為成功:
?????????????????????????????????
?
PS:在安裝pandas過程中經常容易出現錯誤:'ascii' codec can't decode byte 0xd5
??????????????? 解決方法: 在python/lib/site.py中加入 ?
import sys reload(sys) sys.setdefaultencoding('gbk')
?
2. 安裝Pycharm并安裝pandas(也可以添加numpy等包,方法一樣)
?? 下載并安裝Pycharm,然后在Pycharm中添加pandas:(安裝Pycharm的過程不再說明)
?? 打開 File→settings→Project→Project Interpreter,點擊右邊 綠色“+”, 在跳出的頁面上輸入pandas,并點擊Install Package。
?? ? ? ? ? ? ? ? ?? ( PS:出現問題解決方法如上)
? ? ? ? ? ? ? ? ? ? ? ?
二、Linux下
??????????? ①? Linux環境下安裝就比較順利,分別安裝python,pip,pandas即可,
????????????????? 具體流程給大家貼一個鏈接:http://blog.csdn.net/qq_34841823/article/details/52180408(轉);
??????????? ②? 或者安裝Pycharn,然后添加pandas等包即可。
?