1
2

More than 3 years have passed since last update.

jupyter-notebookでpython3が動かない

Posted at

jupyter-notebook起動

ターミナルで

jupyter notebook 

jupyter-notebookを開き、new→python3で新たにファイルを開いた。

print('python')

を入力しても反応がなく出力されない

ターミナルエラー確認

ImportError: cannot import name 'create_prompt_application'

create_prompt_applicationを検索すると下記の記事を見つけた。

jupyterが動作しなかった時の対応メモ

調べていると上記エラー以外にも、jupyter-notebookが動かないエラーは様々あるみたいです。

解決法

一旦 jupyter-notebook を起動しているターミナルを control + C で閉じ、

prompt-toolkitをインストール

pip install prompt-toolkit

prompt-toolkitは自動補完などの便利ツールキット
python prompt toolkitの紹介と動作を理解するメモ

jupyter-notebook再起動

再度ターミナルで

jupyter notebook 

new→python3

print('python')

無事pythonが出力された。

1
2
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
1
2