PyDev的安裝和設置
(2012-01-01 13:21:47)第一種:在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; 應用後會需要導入相應的庫,全部選中。
第二步:語言設置
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",保存
方法:Window -- Preferences -- Pydev -- Editor --Template -- Empty,然後點擊“Edit”按鈕,把我們要添加的語句加進去就可以了
注: 以上是對Empty模版的修改,要修改其他模板
可以採用同樣的方式。
若是在Fedora16中,則相應的eclipse主目錄在:
/usr/lib64/eclipse中,Extract the contents of the zip file in the eclipse/dropins folder and restart Eclipse.亦可。