简体   繁体   English

如何使用ELPY进行自动完成工作?

[英]How can I make auto-complete work with ELPY?

I am currently trying to install the ELPY package for Emacs, which is a Python development mode. 我目前正在尝试为Emacs安装ELPY软件包,这是一种Python开发模式。

I am following the instructions on the Github page, but am having issues. 我正在按照Github页面上的说明进行操作,但是遇到了问题。

When I evaluate the following expressions 当我评估以下表达式时

(package-initialize)
(elpy-enable) 

I see the following in the minibuffer: 我在迷你缓冲区中看到以下内容:

在此处输入图片说明

After that, auto-complete does not work in the mode, although I do see a "Python" item in the top Emacs menu when I am in an *.py file. 此后,尽管我在*.py文件中的确在顶部的Emacs菜单中看到了“ Python”项,但是自动完成在该模式下不起作用。 This may be some other that does that. 这可能是其他的方法。

Could someone tell me how to make auto-complete work with ELPY? 有人可以告诉我如何使用ELPY进行自动完成吗?

It appears that the mode is working, except for auto-complete. 似乎该模式正在运行,但自动完成除外。 I expected something like this to happen, but it does not. 我希望会发生类似的事情,但事实并非如此。

https://files.realpython.com/media/emacs-elpy-basic.5b8849610482.png https://files.realpython.com/media/emacs-elpy-basic.5b8849610482.png

I find elpy-config helpful. 我发现elpy-config很有帮助。 Try Mx elpy-config 试试Mx elpy-config

Then install any python packages that it says are missing. 然后安装它说缺少的所有python软件包。 Missing jedi can cause company to not work. 绝地失踪可能会导致公司无法正常工作。 You can install jedi from the window that elpy-config brings up. 您可以从elpy-config弹出的窗口中安装jedi。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM