1. Install good jupyter and ipykernel
pip install
pip install jupyter
pip install ipykernel
2. ipython generate the key
from notebook.auth import passwd
passwd()
Enter a custom password
can get a bunch of keys, I was
sha1:85b46ae497ee:b2cd494d1f4ded134098fee7af8b818c503c18cd
3. Build and modify the config file jupyter
jupyter notebook --generate-config
vim ~/.jupyter/jupyter_notebook_config.py
Add the following at the beginning
c.NotebookApp.ip='*'
c.NotebookApp.password=u'sha1:85b46ae497ee:b2cd494d1f4ded134098fee7af8b818c503c18cd'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
c.NotebookApp.allow_remote_access = True
4. Add an existing virtual environment
python -m ipykernel install --user --name your-env-name
Which --user
is used to specify the current user is added, or added by default to the root (needs permission)
5. Start jupyter notebook
jupyter notebook
Open a browser on the local, enter the server ip address: port number, and then enter the second step of the custom password to
Reference
https://blog.csdn.net/weixin_41813895/article/details/84750990.
https://blog.csdn.net/Harrytsz/article/details/91047014