jorgenschaefer/elpy

[Question] How to enable autocomplete in REPL?

Opened this issue · 1 comments

Summary

I'm new to emacs and elpy and try to get autocomplete work in Python interactive buffer.

Steps to reproduce

Open a python file, press C-c C-c, codes can be sent to *Python* buffer (major mode Inferior Python) buffer successfully. But no autocomplete if I input partial of function name, press Tab, "No Match" shows in echo area.
And if I input a class name followed by dot, say "foo.", nothing pops after the dot.

image

My configuration

OS: Windows 10
Emacs: 28.2

Result of (elpy-config)

Elpy Configuration

Emacs.............: 28.2
Elpy..............: 1.35.0
Virtualenv........: python (d:/playground/python/)
Interactive Python: jupyter ... (c:/Program Files/Python310/Scripts/jupyter.exe)
RPC virtualenv....: rpc-venv (c:/Users/Admin/.emacs.d/elpy/rpc-venv)
 Python...........: c:/Windows/py.exe 3.10.7 (c:/Windows/py.exe)
 Jedi.............: 0.18.1
 Autopep8.........: 1.7.0
 Yapf.............: 0.32.0
 Black............: 22.8.0
Syntax checker....: flake8.exe (c:/Program Files/Python310/Scripts/flake8.exe)

Warnings

The python interactive interpreter (jupyter) is not installed on the
current virtualenv (d:/playground/python/). The system binary
(c:/Program Files/Python310/Scripts/jupyter.exe) will be used instead.

[Install jupyter]

Options

`Raised' text indicates buttons; type RET or click mouse-1 on a button
to invoke its action.  Invoke [+] to expand a group, and [-] to
collapse an expanded group.  Invoke the [Group], [Face], and [Option]
buttons below to edit that item in another window.

Elpy configuration in my init.el

(elpy-enable)

;; Use IPython for REPL
(setq python-shell-interpreter "jupyter"
  python-shell-interpreter-args "console --simple-prompt"
  python-shell-prompt-detect-failure-warning nil)
(add-to-list 'python-shell-completion-native-disabled-interpreters
         "jupyter")

Any hints on this?
I am having the same issue also in Windows (but not in Ubuntu)

In my init.el file I have:

(setq python-shell-interpreter "ipython"
      python-shell-interpreter-args "-i --simple-prompt")