ubuntu使用python3安装jupyter纪实
1、安装依赖以及软件包
apt-get update apt-get install python3 python3-pip pip3 install jupyter ipython pip3 install jupyter_contrib_nbextensions && jupyter contrib nbextension install
2、建立jupyter工作目录
mkdir -p /data/jupyter/root
3、创建jupyter应用密码
# 执行shell命令,算得密码串 python -c "import IPython;print(IPython.lib.passwd())" # 创建jupyter的配置文件 jupyter notebook --generate-config # 修改配置文件,增加如下配置: c.NotebookApp.ip = '*' # 允许访问此服务器的 IP,星号表示任意 IP c.NotebookApp.password = u'sha1:xxx:xxx' # 之前生成的密码 hash 字串 c.NotebookApp.open_browser = False # 运行时不打开本机浏览器 c.NotebookApp.port = 8888 # 使用的端口 c.NotebookApp.enable_mathjax = True # 启用 MathJax
4、运行jupyter应用
nohup jupyter notebook —allow-root > /dev/null 2>&1 &