Pydev的安装和设置

来源:互联网 发布:在淘宝网买东西可靠吗 编辑:程序博客网 时间:2024/05/22 16:57

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.亦可。

原创粉丝点击