首先创建工作目录
# 创建工作目录mkdir /apps/python-ana3
chown fanfengping.root /apps/python-ana3/
执行如下命令,使用 conda 安装 jupyter notebook
# 使用 conda 安装 jupyter notebook
conda install jupyter notebook
进入ipython环境,生成密码
from notebook.auth import passwd
passwd()

记录上述生成的密码。
使用如下命令生成配置文件。
# 生成配置文件
jupyter notebook --generate-config

修改配置文件,修改如下所示的配置项,并保存。

使用如下命令启动 jupyter notebook
jupyter notebook --allow-root
上述命令无法后台运行,可通过如下命令后台运行
nohup jupyter notebook --allow-root >> jupyter-notebook.log 2>&1 &
启动后,您可以通过链接访问,并输入正确的密码才能成功登录。具体情况如下:
[En]
After startup, you can access it through the link and enter the correct password to log in successfully. As follows:

通过如下所示命令,将配置的端口开放,方便其他主机访问
systemctl start firewalld
firewall-cmd --zone=public --add-port=9091/tcp --permanent
firewall-cmd --reload
Original: https://www.cnblogs.com/fengpingfan/p/15852788.html
Author: 范丰平
Title: Linux-029-Python Anaconda 3 安装 jupyter notebook
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/15821/
转载文章受原作者版权保护。转载请注明原作者出处!