默认情况下,配置文件 ~/.jupyter/jupyter_notebook_config.py
并不存在,需要自行创建。使用下列命令生成配置文件:
jupyter notebook --generate-config
从 jupyter notebook 5.0 版本开始,提供了一个命令来设置密码:jupyter notebook password
,生成的密码存储在 jupyter_notebook_config.json
。
$ jupyter notebook password
Enter password: ****
Verify password: ****
[NotebookPasswordApp] Wrote hashed password to /Users/you/.jupyter/jupyter_notebook_config.json
在 jupyter_notebook_config.py
中找到下面的行,取消注释并修改。
c.NotebookApp.ip = ‘*‘
c.NotebookApp.password = u‘sha:ce...‘
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888 #可自行指定一个端口, 访问时使用该端口
ipykernel
conda install ipykernel
python -m ipykernel install --user --name 环境名称 --display-name "环境名称"
jupyter kernelspec list
jupyter kernelspec remove kernel_name
原文:https://www.cnblogs.com/chainey/p/14252773.html