Windows/Linux安裝python2.7,pycharm和pandas——《利用Python進行資料分析》

來源:互聯網
上載者:User

標籤:package   頁面   idt   查看   blank   版本   目錄   說明   linux環境   

一、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 pandasplot(arange(10))

                 出現以片即為成功:

                                 

 

PS:在安裝pandas過程中經常容易出現錯誤:‘ascii‘ codec can‘t decode byte 0xd5

                解決方案: 在python/lib/site.py中加入  

import sysreload(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等包即可。

 

Windows/Linux安裝python2.7,pycharm和pandas——《利用Python進行資料分析》

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.