### --- 查看jupyter_noteboot_config.py配置文件所在地址
~~~ # 查看jupyter_noteboot_config.py配置文件所在地址
C:\Users\Administrator>jupyter notebook --generate-config
Overwrite C:\Users\Administrator\.jupyter\jupyter_notebook_config.py
### --- 使用pycharm打开配置文件编辑
~~~ # 修改配置文件jupyter_noteboot_config.py,指定jupyter默认启动目录
~~~ # 第391~393
## The directory to use for notebooks and kernels.
# Default: ''
c.NotebookApp.notebook_dir = 'E:/NO.Z.60000.Arithmetic.project'
### --- 启动jupyter模块
~~~ # 启动jupyter模块
C:\Users\Administrator>jupyter notebook
~~~ # 输出参数:
To access the notebook, open this file in a browser:
file:///C:/Users/Administrator/AppData/Roaming/jupyter/runtime/nbserver-9848-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=d5b1b94ad7cad9948fe7ae1cfe557f253f18746d086ad44b
or http://127.0.0.1:8888/?token=d5b1b94ad7cad9948fe7ae1cfe557f253f18746d086ad44b
### --- 通过浏览器访问:
~~~ http://localhost:8888/?token=d5b1b94ad7cad9948fe7ae1cfe557f253f18746d086ad44b
二、安装jupyter插件
### --- 安装插件:jupyter_contrib_nbextensions
~~~ # 安装插件jupyter_contrib_nbextensions
~~~ # 用 pip 安装,二选一
C:\Users\Administrator>pip install jupyter_contrib_nbextensions -i https://pypi.tuna.tsinghua.edu.cn/simple
~~~ # 或用 conda 安装,二选一
C:\Users\Administrator>conda install -c conda-forge jupyter_contrib_nbextensions -i https://pypi.tuna.tsinghua.edu.cn/simple
### --- 安装插件:jupyter_nbextensions_configurator
~~~ # jupyter_nbextensions_configurator
~~~ # 用 pip 安装,二选一
C:\Users\Administrator>pip install jupyter_nbextensions_configurator -i https://pypi.tuna.tsinghua.edu.cn/simple
~~~ # 或用 conda 安装 ,二选一
C:\Users\Administrator>conda install -c conda-forge jupyter_nbextensions_configurator -i https://pypi.tuna.tsinghua.edu.cn/simple
### --- 设置并启动用户
~~~ # 设置并启动用户
~~~ # 设置用户: --User
C:\Users\Administrator>jupyter contrib nbextension install --user
~~~ # 启用用户
C:\Users\Administrator>jupyter nbextensions_configurator enable --user
### --- 运行Jupyter:
~~~ # 运行 Jupyter 以后,在地址栏里输入 http://localhost:8888/nbextensions,直接进入插件界面:
~~~ # 注意:有时候安装完会发现插件点不了,如下图,这时要去掉红框里的√。
C:\Users\Administrator>jupyter notebook
~~~ # 进入插件管理页面:
~~~ http://localhost:8888/nbextensions
### --- 添加相关依赖插件
~~~ Hinterland:代码自动补全
~~~ autopep8: 对单元格里的代码自动排版
~~~ Execute Time,查看单元格的执行时间
~~~ Table of Contents(2),自动目录,需要和 Markdown 配合
~~~ Variable Inspector,显示变量数据
附录一:
### --- Jupyter network插件配置教程
https://blog.csdn.net/j18233653274/article/details/103429137
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)