您的位置:首页 > 编程语言 > Python开发

Emacs Python 自动补全--Elpy

2016-06-27 01:40 1321 查看
安装方法:

首先,安装一些依赖包:

# Either of these
pip install rope
pip install jedi
# flake8 用来检查语法错误
pip install flake8
# importmagic 用来自动引入需要的包
pip install importmagic
# autopep8 用来检查PEP8规范
pip install autopep8
# yapf 用来格式化代码
pip install yapf


然后,在你的Home目录下,创建一个.emacs文件,并写入如下内容:

(require 'package)
(add-to-list 'package-archives
'("elpy" . "https://jorgenschaefer.github.io/packages/"))


打开emacs运行
M-x package-refresh-contents
加载新的库,然后运行
M-x package-install RET elpy RET
(RET即回车键)安装elpy

最后,把下边的内容添加到.emacs文件中

(package-initialize)
(elpy-enable)


完成。



Reference:
https://github.com/jorgenschaefer/elpy https://realpython.com/blog/python/emacs-the-best-python-editor/ http://codingpy.com/article/emacs-the-best-python-editor/ https://www.emacswiki.org/emacs?action=browse;oldid=PythonMode;id=PythonProgrammingInEmacs#toc2 https://elpy.readthedocs.io/en/latest/introduction.html#installation
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: