LoginSignup
0
1

More than 1 year has passed since last update.

jupyterlabのターミナルが動かない時の解決法。safariからchromeへ変更(mac)

Last updated at Posted at 2020-04-20

jupyterlabのterminalが効かない。safariからchromeへ変更(mac)

notebookだけでなく普通の.pyを実行しようとした時、terminalに文字が打ち込めない問題があり困りました。問題を解消するまでのメモをここに残します。
バージョンは、
- macOS High Sierra 10.13.6
- Python 3.7.6
- jupyter lab --version 2.0.1

問題

jupyterlab内のterminalで
(base) xxxxxxxx:~ xxxx$から何も打ち込めない。

やったこと

ググったらsafariが悪い可能性があるというのがわかったので、jupyter labと叩いて開くブラウザをsafariからchromeに変更した。

解決策

  1. jupyter_notebook_config.pyがあるなら、これをいじる。ないならば、jupyter notebook --generate-configと打つ。jupyter_notebook_config.pyを作ってくれる。どこにあるかは、上のコマンドのあとに表示される。
  2. 1でjupyter_notebook_config.pyのある場所がわかったので、そこへいく。自分はfinderを使って移動したが、コマンドで普通に移動しても良い。また、finderでは隠しファイルは表示されない。そんな時はfinderを開いた状態でcommand+shift+.を押すと表示される。
    image.png
  3. ファイルをエディタで開いて、c.NotebookApp.browser=''と書いてあるところへ移動する。
  4. c.NotebookApp.browser=''の直前の#を消す。そして、c.NotebookApp.browser = '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome %s'として、保存。ここの\は空白文字のためのエスケープ。

解決しました。以上です。

参考文献

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