Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to config 'Completer.use_jedi' to 'False' in Juypter Notebook permanently

Every time a new jupyter notebook instance is opened, it requires %config Completer.use_jedi = False command to be run, before autocomplete functionality starts working.

This is tiring every time, to config use_jedi to False before coding.

kindly suggest if there is a permanent fix to have autocomplete in juypter notebook.

like image 864
Santosh K Avatar asked Dec 16 '20 10:12

Santosh K


People also ask

What is %config completer Use_jedi false?

Fortunately, the JupyterLab and Jupyter Notebook comes with the IPython magic command %config Completer. use_jedi = False that enables the library/function autocompletion (like IntelliSense in Microsoft development environment term).

How do I enable autocomplete in Jupyter Notebook?

To 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 Jupyter Notebook support code autocomplete?

Yes you have auto-complete built-in Jupyter, 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.


2 Answers

I launch my jupyterlab from docker and catch this problem. I solved like this:

COPY ipython_kernel_config.py /root/.ipython/profile_default/ipython_kernel_config.py

Content ipython_kernel_config.py:

c.Completer.use_jedi = False

idea: https://github.com/ipython/ipython/issues/11530

like image 167
Vadim Volokzhanin Avatar answered Sep 28 '22 01:09

Vadim Volokzhanin


# Generate config
ipython profile create
# Edit config file in vim
vim .ipython/profile_default/ipython_kernel_config.py
# And change 
c.IPCompleter.use_jedi = False in ipython_config.py

For More info - https://github.com/ipython/ipython/issues/11530

like image 37
bhola prasad Avatar answered Sep 28 '22 02:09

bhola prasad