How can I disable the autocomplete function in Jupyter notebook(Tab) - jupyter-notebook

I typed "Summary" outside the cell and change the config of Jupyter notebook.
When I press Tab, the autocomplete menu pop out, but I only want 4 spaces when I press Tab. I Google this question and try something like:
%config IPCompleter.greedy=False
However, I still have the autocomplete menu when I press Tab. How can I disable it?

There is an extension called 'Hinterland' for jupyter, which automatically displays the drop down menu when typing or control when it should appears . There are also some other useful extensions.
In order to install extensions, you can follow the guide on this Github repository . To easily activate extensions, you may want to use the extensions configurator.
To install Hinterland run in a Conda terminal this:
conda install -c conda-forge jupyter_nbextensions_configurator
To enable it :
jupyter nbextension enable hinterland/hinterland

Related

there is noly three checkbox in jupyter notebook nbextentions

I am insatlling jupyter notebook nbextensions on my window serer which can not connect to Internet,the version of NBextensions is 0.5.1 .
However ,I got only three checkbox on the tab of NBextensions, and I can't find Hintreland checkbox, what should I do now?
enter image description here
jupyter contrib nbextension install --user
I have got the anser

modifying main menu of jupyter lab

I'm trying to modify the main menu of jupyter lab through jupyterlab extension. What I want to do is to remove or collapse all tabs into one. As I didn't find any explanation on that I tried to follow a tutorial to work with menu tabs: https://github.com/jupyterlab/extension-examples/tree/master/main-menu
However, I'm not being able to reproduce it. I run these commands on the terminal (inside the main-menu folder):
python -m pip install -e .
# install your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# build the TypeScript source after making changes
jlpm run build
# start JupyterLab
jupyter lab
But the "Main Menu Example" tab never appears.
What could it be? some cache information that I need to clean?

How to have the autocomplete feature in jupyter notebook like we have in pycharm or visual code?

I just want that autocomplete feature like I have in VC studio and pycharm in jupyter notebook, is there any way folks? I saw in some youtube tutorials people completing the code using the tool, any idea about that?
There is a hinterland functionality that when enabled then auto-complete code works.
For you to access the functionality first install jupyter_contrib_nbextensions as follows:
Install the python package
pip install jupyter_contrib_nbextensions
Then install javascript and css files
jupyter contrib nbextension install --user
More information on how to install can be found here
Then re-start the jupyter notebook. Look for a tab named Nbextensions and click on it. Then look for Hinterland and make sure that it is checkd:
Refresh/Restart jupyter notebook for changes to take place.
You just have to click the "Tab"-Button after typing something (e.g. a Class name followed by a dot). Then you find suggestions that you can insert by using Tab or Enter.

Can't use IPython console in PyCharm

I wanted to use ipython as default console in Pycharm but it doesn't work.
I have selected use ipython when available in the console option available under Build,Deployment and Execution in Settings. Did the same in Default Settings also. But it doesn't seem to work.
I am using Python 3.6.3 , IPython 6.2.1 and PyCharm Professional 2017.3
This is probably because IPython is not recognized as a package in your project interpreter.
This usually happens when you configure a virtualenv for your project, but don't check the Inherit global site-packages checkbox.
Fixing is quite easy:
Go to Settings -> Project: <project name> -> Project interpreter
At the bottom of the packages list you should see a + sign.
Press that button, find ipython and install it.
On the next time you'll open your console, IPython will be detected and used automatically.
You have not installed IPython package.
Do this:
              File → Settings... → Project your_project → Python Interpreter
then click the + button on the right-hand vertical toolbar (see the red arrow in the picture):
and from the new popup window select and install ipython package:
Finally, restart your Python Console.

Jupyterlab: turn on tab completion for text editor as in Notebook?

In Jupyterlab, there is a text editor that we can open .py files, is it possible to also turn on tab completion, just like how it works in Notebook ?
By now, tab completion in the text editor of jupyter lab has been implemented in this pull request (see also discussion in this issue). However, for it to be working you need to open a console for the editor (right click in the editor window and select Create Console for Editor).
No, it is currently an open issue. https://github.com/jupyterlab/jupyterlab/issues/1276
The package jupyterlab-lsp now provides tab completion in the text editor. You need can install it from pip or conda, along with a language server for Python:
pip install jupyter-lsp
pip install jedi-language-server
I also needed to enable the server side extension:
jupyter server extension enable --user --py jupyter_lsp
And enabled #krassowski/jupyterlab-lsp and #krassowski/completion-theme via JupyterLab's extension GUI (the puzzle piece on the right hand side). Then I restarted JupyterLab, and completion worked (with Tab). I am not sure if all these steps are neccessary, it might depend on your environment.

Resources