IPython and Jupyter autocomplete not working

PythonJupyter NotebookIpython

Python Problem Overview


I am very new to this and don't know why the autocomplete is not working. I tried modifying the iPython config file, installed readline, but still nothing.

Python Solutions


Solution 1 - Python

A possible reason a user may believe that autocomplete is not working may be that autocomplete is just taking too long. Circa 2020-11-27 this is particularly true for Pandas when operating with jedi in a Jupiter notebook environment.

The issue can be solved by using the following magic which deactivates jedi

%config Completer.use_jedi = False

For a deeper discussion follow the this thread and the links therein.

Solution 2 - Python

the current Ipython with the Jupyter notebook doesn't require jedi.. So you have to just uninstall it with the following command.

pip uninstall jedi --yes

Solution 3 - Python

Seems like installing a specific version of jedi worked for me:

!pip install --upgrade jedi==0.17.2

Solution 4 - Python

Installing:

C:> pip install pyreadline

works fine, as it was suggested in an older post

Solution 5 - Python

Ipython 6+ now has [jedi integration][1] built in.

update Ipython, and install jedi:

pip install ipython --upgrade
pip install jedi

If you are using Anaconda / conda:

$> conda update jupyter --update-dependencies
$> conda install jedi

[1]: http://blog.jupyter.org/2017/04/19/release-of-ipython-6-0/ "jedi integration"

Solution 6 - Python

just below the Python logo there is a button saying >not trusted

click on it and set it as trusted notebook.

Solution 7 - Python

I use JupyterLab 3.0.6. I have ipython 7.19.0 and jedi 0.18 installed. As @DaveHalter indicated, better than <% config Completer.use_jedi = False> is to use the previous version of the jedi . In 2021-01-31 it worked perfectly for me.

Solution 8 - Python

If you are using jedi=0.18 with ipython=7.19 try this in your environment:

pip install -U ipython==7.20

see this github discussion.

Solution 9 - Python

If you tried to install tabnine with the juptyerlab extension manager, type in

pip uninstall jupyterlab_tabnine

in a shell. When you still get the problem, delete the folder

%appdata%\Python\share\jupyter\labextensions\@tabnine\

this worked for me

Solution 10 - Python

install jupyter contrib nbextensions by running

pip install jupyter_contrib_nbextensions

Next install js and css file for jupyter by running

jupyter contrib nbextension install --user

and at the end run,

jupyter nbextension enable hinterland/hinterland

The output of last command will be

Enabling notebook extension hinterland/hinterland...
      - Validating: OK

I refer from this: https://stackoverflow.com/questions/45390326/how-to-get-autocomplete-in-jupyter-notebook-without-using-tab/63761440#63761440

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser2822693View Question on Stackoverflow
Solution 1 - PythonHeberto MayorquinView Answer on Stackoverflow
Solution 2 - PythonHarish PanwarView Answer on Stackoverflow
Solution 3 - PythonOren YosifonView Answer on Stackoverflow
Solution 4 - Pythonuser2822693View Answer on Stackoverflow
Solution 5 - PythonLundyView Answer on Stackoverflow
Solution 6 - PythonHamed AkhavanView Answer on Stackoverflow
Solution 7 - PythonFernando L CoutoView Answer on Stackoverflow
Solution 8 - PythonmasoudView Answer on Stackoverflow
Solution 9 - PythonGuiTaekView Answer on Stackoverflow
Solution 10 - Pythoncng.buffView Answer on Stackoverflow