0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Jupyter Notebookでコードの自動補完でエラーがでる

Last updated at Posted at 2021-08-27

問題

Jupyter-notebookにて
以下画面でtabを押して補完しようとすると、エラーが出る。

Screenshot from 2021-08-27 13-39-00.png

[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
以下略
  File "/home/xxxxx/xxxxx/xxxxx/lib/python3.6/site-packages/IPython/core/completer.py", line 1374, in _jedi_matches
    text[:offset], namespaces, column=cursor_column, line=cursor_line + 1)
  File "/home/xxxxx/xxxxx/xxxxx/lib/python3.6/site-packages/jedi/api/__init__.py", line 726, in __init__
    project=Project(Path.cwd()), **kwds)
TypeError: __init__() got an unexpected keyword argument 'column'

原因

標準でpipでインストールされる、補完に使っている標準オプションのJediのversionがあってないのが原因らしい

環境

python 3.6
Jedi 0.18
Ipython 7.26

解決

以下で一発解決。

pip install jedi==0.17.2

イケてない解決

毎回以下のコマンドをいつ込み、Jediの使用をやめる。
毎回jupyter起動するたび、こんなコマンドを打ってられない。

%config Completer.use_jedi = False

以下のコマンドでは何も変わらない。

%config IPCompleter.greedy=True
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?