CentOS7安装jupyter

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/iFan138/article/details/88424753

安装

python3 -m pip install jupyter

配置

生成配置文件

jupyter notebook --generate-config

生成登录密码

python3 -c 'from notebook.auth import passwd; print(passwd("usepassword"));'

修改配置文件

vim ~/.jupyter/jupyter_notebook_config.py

配置文件的内容

# 设定ip访问,允许任意ip访问
c.NotebookApp.ip = '0.0.0.0'
# 不打开浏览器
c.NotebookApp.open_browser = False
# 用于访问的端口,设定一个不用的端口即可,这里设置为7000
c.NotebookApp.port = 7000
# 设置登录密码, 将刚刚复制的内容替换此处的xxx
c.NotebookApp.password = u'xxx'
# 设置jupyter的工作路径
c.NotebookApp.notebook_dir = '/xxx/jupyter'

如果出现某个文件没有权限的

export XDG_RUNTIME_DIR="/xxx/jupyter/data"

启动

 jupyter notebook

猜你喜欢

转载自blog.csdn.net/iFan138/article/details/88424753
今日推荐