/dev/null)" if [ $? -eq 0 ]; the..._怎么查看配置jupyter notebook环境变量配置成功">
赞
踩
进入配置界面,输入命令:vim ~/.bashrc
在配置界面输入一下代码:
- _conda_setup="$(CONDA_REPORT_ERRORS=false '/home/dongjian/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
- if [ $? -eq 0 ]; then
- \eval "$__conda_setup"
- else
- if [ -f "/home/dongjian/anaconda3/etc/profile.d/conda.sh" ]; then
- . "/home/dongjian/anaconda3/etc/profile.d/conda.sh"
- CONDA_CHANGEPS1=false conda activate base
- else
- \export PATH="/home/dongjian/anaconda3/bin:$PATH"
- fi
- fi
- #进入vim环境:$vim ~/.jupyter/jupyter_notebook_config.py
-
- #修改以下内容:
- c.NotebookApp.allow_origin = '*'
- c.NotebookApp.allow_remote_access = True
- c.NotebookApp.ip = '*'
- c.NotebookApp.open_browser =False
- c.NotebookApp.password = u'sha1:001b822d8d01:080d7989820d63c5175d0fbca12f5ee27f7c8c35'
- #jupyter初始文件夹 例:/E/home/mayajun/mydocument
- c.NotebookApp.notebook_dir = '初始文件夹'
- #端口配置,随便一个4位数,例如:8765 (注意不要设置8888等容易雷同的)
- c.NotebookApp.port = 四位数字
#~jupyter notebook --generate-config
注意:
Linux中
source ~/.bashrc
- # conda activate base
- # conda list
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。