anaconda的虚拟python环境配置jupyter

发布时间 2023-07-05 16:23:21作者: 壶小旭

anaconda的虚拟python环境配置jupyter

#进入虚拟环境后安装nb_conda
conda install nb_conda

#配置端口号
jupyter notebook --generate-config
#依据生成的文件,进行vim修改,添加下面内容
vi /root/.jupyter/jupyter_notebook_config.py 
"""
c.NotebookApp.allow_remote_access = True #允许远程访问
c.NotebookApp.ip='*' #所有人访问
c.NotebookApp.open_browser = False
c.NotebookApp.port =9991     #可自行指定一个端口, 访问时使用该端口
"""

#配置访问密码,登录的时候使用的是手动输入的密码
jupyter notebook password
cat /root/.jupyter/jupyter_notebook_config.json 



#运行jupyer
jupyter notebook --allow-root #如果是root用户使用--allow-root,反之则不用