Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TAB completion does not work in Jupyter Notebook but fine in iPython terminal

TAB completion works fine in iPython terminal, but not in Firefox browser.

So far I had tried but failed,

1). run a command $ sudo easy_install readline,

then the .egg file was wrote in /usr/local/lib/python2.7/dist-packages/readline-6.2.4.1-py2.7-linux-x86_64.egg,

but TAB completion still doesn't work in Jupyter Notebook.

2). also tried to find locate the ipython_notebook_config.py or ipython_config.py, but failed.

I use Python 3.5 and iPython 4.0.0. and both are installed in Ubuntu 15.10 /usr/share/anaconda3/bin/ipython.

Any help would be appreciated!

like image 506
F.wo.huang Avatar asked Nov 12 '15 05:11

F.wo.huang


People also ask

How do I enable tab completion in jupyter notebook?

Access the Jupyter Menu You have auto-complete in Jupyter notebooks like you have in any other Jupyter environment. Simply hit the “Tab” key while writing code. This will open a menu with suggestions. Hit “Enter” to choose the suggestion.

Why is my jupyter notebook not autocomplete?

Enable autocomplete featureTo enable code autocomplete in Jupyter Notebook or JupyterLab, you just need to hit the Tab key while writing code. Jupyter will suggest a few completion options. Navigate to the one you want with the arrow keys, and hit Enter to choose the suggestion.

Does IPython have tab completion feature?

Latex and Unicode completion IPython and compatible frontends not only can complete your code, but can help you to input a wide range of characters. In particular we allow you to insert a unicode character using the tab completion mechanism.

How do you indent in a jupyter notebook?

Ctrl + ] indent. Ctrl + [ dedent. Ctrl + A select all.


2 Answers

It's a known issue and jedi is the problem. Try executing:

pip3 install jedi==0.17.2

https://github.com/jupyter/notebook/issues/2435

like image 107
Sagnik Avatar answered Sep 28 '22 12:09

Sagnik


My problem was in that I try to call autocomplete and import in the same cell. Because of imported thing does not initialized yet, autocomplete does not work.

All I need is call to the object in a new cell enter image description here

UPD: or just run program once in the same cell to initialize imported

like image 21
shurik2533 Avatar answered Sep 28 '22 11:09

shurik2533