I encounter an issue where the auto-completion is not working on elpy 1.35.0. There is no prompt-up to show the possible candidates.
This is my elpy configure:
Elpy Configuration
Emacs.............: 27.1
Elpy..............: 1.35.0
Virtualenv........: None
Interactive Python: python 3.8.5 (/Users/yichaocai/miniconda3/bin/python)
RPC virtualenv....: miniconda3 (/Users/yichaocai/miniconda3)
Python...........: python 3.8.5 (/Users/yichaocai/miniconda3/bin/python)
Jedi.............: 0.18.0
Rope.............: 0.19.0
Autopep8.........: 1.5.6
Yapf.............: 0.31.0
Black............: 21.4b0
Syntax checker....: flake8 (/Users/yichaocai/miniconda3/bin/flake8)
Warnings
You have not activated a virtual env. It is not mandatory but often a
good idea to work inside a virtual env. You can use `M-x
pyvenv-activate` or `M-x pyvenv-workon` to activate one.
The directory ~/.local/bin/ is not in your PATH. As there is no active
virtualenv, installing Python packages locally will place executables
in that directory, so Emacs won't find them. If you are missing some
commands, do add this directory to your PATH -- and then do
`elpy-rpc-restart'.
This is the trunk of code in my init.el:
;; init.el --- Emacs configuration
;; INSTALL PACKAGES
;; --------------------------------------------
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/"))
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(defvar myPackages
'(elpy))
(mapc #'(lambda (package)
(unless (package-installed-p package)
(package-install package)))
myPackages)
;; BASIC CUSTOMIZATION
;; --------------------------------------------
;; elpy configuration
(elpy-enable)
;; Load elpy
;; (use-package elpy
;; :ensure t
;; :init
;; (elpy-enable))
;; Add company backend for elpy solution 1
;; (add-hook 'elpy-mode-hook
;; (lambda ()
;; (set (make-local-variable 'company-backends)
;; '((company-dabbrev-code company-yasnippet elpy-company-backend))))
;; Add company backend for elpy solution 2
;; (add-hook 'python-mode-hook
;; (lambda ()
;; ;; explicitly load company for the occasion when the deferred
;; ;; loading with use-package hasn't kicked in yet
;; (company-mode)
;; (add-to-list 'company-backends
;; ('elpy-company-backend))))
;; Let elpy to find python in current environment
(setq elpy-rpc-virtualenv-path 'current)
;; Set elpy to use the conda python3 instead of system default python2.
;; (setq elpy-rpc-python-command "/Users/yichaocai/miniconda3/bin/python");;<<CHANGE
;; init.el ends here
Hi,
I encounter an issue where the auto-completion is not working on elpy 1.35.0. There is no prompt-up to show the possible candidates.
This is my elpy configure:
This is the trunk of code in my
init.el
:For the solution 1 (https://github.com/jorgenschaefer/elpy/issues/1359#issue-318317905) and solution 2 (https://github.com/jorgenschaefer/elpy/issues/530#issue-66637739), they are from these two related issues. I tried both of them but failed to resolve the issue.
I also checked in the elpy buffer of the enabled modes to make sure that company is enabled:
The values of the
company-backends
is:I am using a MacBook Pro (13-inch, Mid 2012) with high sierra 10.13.6.
How can I config the auto-completion of elpy? Please suggest and thank you very much!