Pydev的安裝和設置

PyDev的安裝和設置

 (2012-01-01 13:21:47)
標籤: 

雜談

分類: python
1. 安裝,兩種方式:
第一種:在Help菜單中,選擇Install New Software , 選擇Add按鈕,Name:PyDev(這個隨便起),Location:http://pydev.org/updates  即可。

第二種:

Eclipse 3.4 and 3.5

Extract the contents of the zip file in the eclipse/dropins folder and restart Eclipse.

Before Eclipse 3.4

Extract the contents of the zip file on top of Eclipse, making sure the plugins folder is extracted on top of the eclipse/plugins folder and the features is on top of theeclipse/features folder. After that, restart Eclipse with the '-clean' flag, so that Eclipse finds out about it.

顯然,我當然版本是3.7  選用前一種方式。

驗證是否安裝成功:

Window -- Preferences --PyDev  若存在,則證明安裝成功。


2.配置PyDev

第一步:Windows -- Preferences -- PyDev -- Interpreter -- Python 填上解釋器名字和路徑,路徑選相應的python.exe; 應用後會需要導入相應的庫,全部選中。

PyDev的安裝和設置
PyDev的安裝和設置

第二步:語言設置

1)General->Editors->Text Editors->Spelling,Encoding改成Other:UTF-8

2)General->Workspace,Text file encoding改成Other:UTF-8

3)找到安裝目錄下的\plugins\org.python.pydev.debug_x.x.x.yyyymmddhh\pysrc\pydevd.py,
920行的 encoding = Non 改成 encoding = "UTF-8",保存


第三步:模板設置,加上#-*- encoding: utf-8 -*- , 此句 , 則python 每次新建一個py文件時,都會加上此,則中文編碼錯誤不再出現。
方法:Window -- Preferences -- Pydev -- Editor --Template -- Empty,然後點擊“Edit”按鈕,把我們要添加的語句加進去就可以了
PyDev的安裝和設置

注: 以上是對Empty模版的修改,要修改其他模板
PyDev的安裝和設置


可以採用同樣的方式。



若是在Fedora16中,則相應的eclipse主目錄在:

/usr/lib64/eclipse中,Extract the contents of the zip file in the eclipse/dropins folder and restart Eclipse.亦可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章