[PYTHON] Launch jupyter notebook (+ take security measures)

Target

-[] Change jupyter port to 9999 -[] Password login method

jupyter installation

$ sudo pip install --upgrade pip
$ sudo pip install jupyter

Password hash for remote access

$ ipython
In [1]: from IPython.lib import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]:~~~~~~Hashed password ~ ~ ~ ~
Out[2]:exit

Create a storage directory for notes created by jupyter

$  mkdir ~/jupyter_dir

Create jupyter config Change config

$ jupyter notebook --generate-config
Writing default config to: ~/.jupyter/jupyter_notebook_config.py
$ vi + ~/.jupyter/jupyter_notebook_config.py

jupyter_notebook_config.py


Add the following to the last line
          c.IPKernelApp.pylab = 'inline'
          c.NotebookApp.ip = '*'
          c.NotebookApp.open_browser = False
          c.NotebookApp.port = 9999
          c.NotebookApp.password = u'<Created hash key>'
          c.NotebookApp.notebook_dir = '<Created directory>'

Start with background

$ cd ~
$ nohup jupyter notebook >> jupyter.log 2>&1 &

If there is an error, you can find out by looking at (~ / jupyter.log)

Connect to jupyter and make sure it connects

http://IPアドレス:9999

Recommended Posts

Launch jupyter notebook (+ take security measures)
Jupyter Notebook memo
Introducing Jupyter Notebook
Powerful Jupyter Notebook
Jupyter notebook password
Jupyter Notebook memo
Launch Jupyter notebook / termial by right-clicking [Win / Linux]
Easily launch jupyter notebook on AWS and access locally
How to instantly launch Jupyter Notebook from the terminal
3 Jupyter notebook (Python) tricks
[Cloud103] # 3 Jupyter Notebook again
Shortcut key for Jupyter notebook
Introduced Jupyter Notebook to CentOS 7
Using Graphviz with Jupyter Notebook
Use pip with Jupyter Notebook
Multiprocessing error in Jupyter Notebook
Try using Jupyter Notebook dynamically
[Super Basics] About jupyter Notebook
High charts on Jupyter notebook
View PDF on Jupyter Notebook
Use Cython with Jupyter Notebook
homebrew, pyenv, anaconda, Jupyter Notebook
Play with Jupyter Notebook (IPython Notebook)
[Complete version] Jupyter Notebook shortcut
Run Jupyter Notebook on windows
How to use Jupyter Notebook
python3.8 venv environment jupyter notebook
A simple way to launch Jupyter Notebook / Lab and set a password