jupyter-tabnine icon indicating copy to clipboard operation
jupyter-tabnine copied to clipboard

Cannot install Tabnine in conda environment (Python=3.7.5), Ubuntu 18.04, zsh shell

Open alvinjamur opened this issue 5 years ago • 8 comments

I would love to use and subscribe to tabnine. In this case I wanted to start using it in a Jupyter Notebook so I activated a freshly made conda environment then did the following inside it:

  1. pip3 install jupyter-tabnine (installs a bunch of things and finishes ok)
  2. RUN jupyter nbextension install --py jupyter_tabnine
  3. RUN jupyter nbextension enable --py jupyter_tabnine
  4. RUN jupyter serverextension enable --py jupyter_tabnine ......(1,2,3,4) runs ok but when I start a new jupyter notebook....I don't see any auto-completions or suggestions.

If I drop the "RUN" statement from (2,3,4) I get the following errors

  1. jupyter nbextension install --py jupyter_tabnine

Installing /home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/jupyter_tabnine/static -> jupyter_tabnine Traceback (most recent call last): File "/home/alministrator/anaconda3/envs/mbo/bin/jupyter-nbextension", line 11, in sys.exit(main()) File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/jupyter_core/application.py", line 268, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/traitlets/config/application.py", line 664, in launch_instance app.start() File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/notebook/nbextensions.py", line 983, in start super(NBExtensionApp, self).start() File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/jupyter_core/application.py", line 257, in start self.subapp.start() File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/notebook/nbextensions.py", line 711, in start self.install_extensions() File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/notebook/nbextensions.py", line 690, in install_extensions **kwargs File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/notebook/nbextensions.py", line 220, in install_nbextension_python destination=dest, logger=logger File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/notebook/nbextensions.py", line 121, in install_nbextension ensure_dir_exists(nbext) File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/site-packages/jupyter_core/utils/init.py", line 13, in ensure_dir_exists os.makedirs(path, mode=mode) File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/os.py", line 211, in makedirs makedirs(head, exist_ok=exist_ok) File "/home/alministrator/anaconda3/envs/mbo/lib/python3.7/os.py", line 221, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter'

==== 3) jupyter nbextension enable --py jupyter_tabnine

Enabling notebook extension jupyter_tabnine/main... - Validating: problems found: - require? X jupyter_tabnine/main

  1. jupyter serverextension enable --py jupyter_tabnine

Enabling: jupyter_tabnine

  • Writing config: /home/alministrator/.jupyter
    • Validating... jupyter_tabnine OK

....I don't see anything active when I then startup jupyter notebook and try something....

alvinjamur avatar Jan 03 '20 14:01 alvinjamur

Hi @alvinjamur, please refer to this doc https://github.com/wenmin-wu/jupyter-tabnine/blob/master/DEBUG.md to give me more information about your problem.

wenmin-wu avatar Jan 28 '20 06:01 wenmin-wu

I'm having the similar issue. The tabnine extension works find in the jupyter notebook but not jupyter lab. When running jupyter lab After following the DEBUG process here: https://github.com/wenmin-wu/jupyter-tabnine/blob/master/DEBUG.md, the logs in the inspect console didn't show anything started with [nbextensions/jupyter_tabnine/main], (which is shown when using jupyter notebook in the same virtualenv), so apparently, the extension is not running in the background for jupyter lab ...

dancebean avatar Jan 28 '20 23:01 dancebean

@alvinjamur you have permission denied in step 2, try with sudo:

sudo jupyter nbextension install --py jupyter_tabnine

Rouizi avatar Feb 07 '20 13:02 Rouizi

hi, i had follow the instruction for installation tabnine from your github, but that not working in my jupyter notebook . The entire of installation process was successful but when i try to debug tabnine i had notice like this . How can i solve this problem ? thank you tabnine

syifa-humaira avatar May 20 '20 13:05 syifa-humaira

Hi,

I have installed TabNine for python in jupyter notebook installed through Anaconda. And I have the same problem that TabNine is unable to start the python semantic completion backend. I tried as suggested in https://www.tabnine.com/semantic I created TabNine.toml and wrote the following in It.

[language.python]
command = "pyls"
install = [["pip", "install", "python-language-server"]

and restarted TabNine. but still, it can not run the command. (the full PATH also didn't take me anywhere) Is there a solution to this problem? thanks

nimabte avatar Dec 09 '20 03:12 nimabte

Hi, I am a Windows 10 user and was experiencing the same issue @nimabte described above. After some trial and error I was able to make TabNine semantic completion work for by creating the file TabNine.toml, following the instructions in https://www.tabnine.com/semantic, but I had to change the command field:

[language.python]
command = "python -m pyls"
install = [["pip", "install", "python-language-server"]]

sergioacmacedo avatar Dec 24 '20 14:12 sergioacmacedo

Hi, I am a Windows 10 user and was experiencing the same issue @nimabte described above. After some trial and error I was able to make TabNine semantic completion work for by creating the file TabNine.toml, following the instructions in https://www.tabnine.com/semantic, but I had to change the command field:

[language.python]
command = "python -m pyls"
install = [["pip", "install", "python-language-server"]]

@sergioacmacedo Thanks for the reply

I tried it! didn't work for me! with the same message:

TabNine was unable to start the python semantic completion backend.
The command tried was: `python -m pyls`
This means you need to install the backend manually.
For help, see tabnine.com/semantic.
Or, type TabNine::no_sem to disable semantic completion for Python.

nimabte avatar Dec 26 '20 15:12 nimabte

I'm facing the same issue, nbextension install is trying to use system path instead of the anaconda environment.

saidnamyzO avatar Feb 25 '22 13:02 saidnamyzO