Remotely connect IPython notebook

I want to start IPython on raspberry pi and connect it from the outside to use it. Work log to realize this function.

By the way, the usage environment is as follows.

$ python --version
Python 2.7.9
sudo apt-get install ipython ipython-notebook
sudo apt-get install python-matplotlib python-scipy
sudo apt-get install python-pandas python-sympy
ipython notebook

This completes the installation of IPython itself. Next, build an environment that can be connected from the outside.

sudo pip install jupyter

Installation of Jupyter is now OK.

Create a configuration file for the external connection environment.

First, start ipython and set the password for Jupyter login.

$ ipython
In [1]: from notebook.auth import passwd

In [2]: passwd()
	Enter password: <Enter password>
	Verify password: <Re-enter password>
	Out[2]: 'sha1:<Hashed password>'

Make a copy of the hashed password.

Next, create a configuration file.

$ mkdir ~/.jupyter
$ vim ~/.jupyter/jupyter_notebook_config.py

~/.jupyter/jupyter_notebook_config.py


c = get_config()

#Allows what is drawn with matplotlib to be displayed on notebook
c.IPKernelApp.pylab = 'inline'
#Allow connections from all IPs
c.NotebookApp.ip = '*'
#Login password for IPython notebook
c.NotebookApp.password = 'sha1:<Hashed password>'
#Setting whether to start the browser at startup(The default is to start)
c.NotebookApp.open_browser = False
#Port specification(The default is 8888)
c.NotebookApp.port = <Connection port>

The setting is completed. Check the operation.

jupyter notebook

Connect to http: // <ip address>: <connection port> from the browser of the external machine. You will be asked for a password, so enter the password you set above to log in.

Recommended Posts

Remotely connect IPython notebook
ipython notebook installation
IPython Notebook Recommendations
[IPython] How to Share IPython Notebook
Parallel computing with iPython notebook
Displaying strings on IPython Notebook
How to use IPython Notebook
Play with Jupyter Notebook (IPython Notebook)
Launch the IPython notebook server
Run Apache-Spark with IPython Notebook
Run IPython Notebook on Docker
Use Bokeh with IPython Notebook
R & D life with iPython notebook
Build IPython Notebook environment with boot2docker
Batch processing notes in IPython Notebook
IPython Notebook is now rendered on GitHub!
Use apache Spark with jupyter notebook (IPython notebook)
"LIVE" HTML presentation with IPython 3.0.0-dev, IPython Notebook
Rich cell output with Jupyter Notebook (IPython)
How to revive cells in iPython notebook