Help us understand the problem. What is going on with this article?

ipython notebook(jupyter)をリモートから使う

More than 1 year has passed since last update.

環境

Ubuntu 14.04 LTS
anaconda 3.19.0
python 2.7.X

ipython notebookとjupyterとの関係

http://blog.jupyter.org/2015/08/12/first-release-of-jupyter/
今後、ipython notebookはjupyterになるということですかね。
今まで出ていたコマンドも置き換えるように推奨されてます。

実行手順

1.profileの生成
profileは不要になったようです
2. notebook_config.pyファイルの生成
jupyter notebook --generate-config
でconfigファイル(~/.jupyter/jupyter_notebook_config.py)を作成。
3. ipythonを実行、下記のコマンドでパスワードのハッシュ値を生成
In [1]: from IPython.lib import passwd
In [2]: passwd()
ここでパスワードを打ち込むとハッシュ値が生成(sha1:XXXXXXX)されるので、
そちらをコピーして、テキストファイルなどに保存。
4. ~/.jupyter/jupyter_notebook_config.pyの末尾に下記を記載

c.IPKernelApp.pylab = 'inline'
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 9999
c.NotebookApp.password = u'sha1:XXXXXXX(#先ほど保存したハッシュ値を記載)'

5. 実行
jupyter notebook &

これで、リモートクライアントのブラウザから
http://<jupyter実行ホストのIP Address>:9999
と打ち込むとipythonにアクセスできるようになります。
アクセス元を絞りたい時には,c.NotebookApp.ip = ''の部分を修正してください

追記

Jupyter>5.7から

c.NotebookApp.ip = '*'
ではなく
c.NotebookApp.ip = '0.0.0.0'
にする必要があるそうです。

https://stackoverflow.com/questions/52706238/jupyter-throwing-error-socket-gaierror-errno-2-name-or-service-not-known

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした