怎么搭建Python3 jupyter笔记本服务器

  介绍

这篇文章主要介绍怎么搭建Python3 jupyter笔记本服务器,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

<强> 1。jupyter笔记本安装

?创建jupyter目录

mkdir  jupyter   cd  jupyter/

?创建独立的Python3运行环境,并激活进入该环境

virtualenv ——python=python3 ——no-site-packages  venv   source  venv/bin/激活

?安装jupyter

pip  install  jupyter

<强> 2。jupyter笔记本配置

?创建笔记本目录

mkdir 笔记本

用于保存网页端创建的ipynb文件。

?生成配置文件

jupyter  notebook ——generate-config

生成的配置文件保存在当前用户的.jupyter目录下。

?生成密码密文

python  -c “import  IPython;,打印(IPython.lib.passwd ()),

执行后输入密码,生成类似& # 39;sha1: xxx: xxx # 39;的密文。

?修改配置文件

c.NotebookApp.allow_remote_access =, True ,,, #,允许远程访问   时间=c.NotebookApp.ip  & # 39; * & # 39;,,,,,,,,,,,,, #,允许任意ip访问此服务器   时间=c.NotebookApp.password  & # 39; sha1: xxx: xxx # 39;,,,,, #,上一步生成的密文   时间=c.NotebookApp.open_browser  False ,,,,,, #,运行时不打开本机浏览器   c.NotebookApp.allow_root =True ,,,,,,,, #,允许使用,root 权限运行   c.NotebookApp.port =, 8888,,,,,,,,,,,, #,指定,jupyter  notebook 使用的端口=c.ContentsManager.root_dir  & # 39;笔记本电脑,,,,,#,指定,ipynb 等文件的保存目录

<强> 3。启动jupyter笔记本

?直接运行

jupyter 笔记本

?后台运行

nohup  jupyter  notebook 祝辞,~/jupyter/jupyter.log  2祝辞,1,,

以上是“怎么搭建Python3 jupyter笔记本服务器”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!

怎么搭建Python3 jupyter笔记本服务器