Jupyter插件安装及其虚拟多环境创建

Jupyter及其插件安装

Jupyter安装

pip install jupyter

Jupyter使用

jupyter notebook

Jupyter插件管理

pip install jupyter_contrib_nbextensions

jupyter contrib nbextension install --user

pip install jupyter_nbextensions_configurator

jupyter nbextensions_configurator enable --user

第一个和第二个命令安装了用于管理安装插件的工具,第二个和第三个命令是安装激活用于配置扩展管理的工具

加载插件

如果没有使用jupyter_nbextensions_configurator,需要自己用命令行工具手动加载,如果使用了该插件,则可以在Jupyter中进行配置
Jupyter插件集合:Unofficial Jupyter Notebook Extensions

jupyter nbextension enable codefolding/main
Jupyter

Jupyter主题安装

pip install jupyterthemes

查看可用主题:jt -l

激活某个主题:jt -t oceans16

Jupyter下conda多环境管理

  1. 首先安装内核管理工具

    pip install ipykernel

  2. 创建虚拟环境的内核(使用命令创建以后就可以在Jupyter中看到新创建的内核了)

    source activate osgeo

    python -m ipykernel install --user --name osgeo --display-name "Python (osgeo)"

  3. 查看创建的虚拟环境内核

    jupyter kernelspec list

  4. 删除创建的虚拟环境内核

    jupyter kernelspec uninstall osgeo

已标记关键词 清除标记
按照 https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html#install-the-python-package 提供的安装方法 执行以下命令 pip install jupyter_contrib_nbextensions 无报错并提示 Installing collected packages: jupyter-nbextensions-configurator, jupyter-contrib-nbextensions Successfully installed jupyter-contrib-nbextensions-0.5.0 jupyter-nbextensions-configurator-0.4.0 执行 jupyter contrib nbextension install --user 无报错 ``` Enabling: jupyter_nbextensions_configurator - Writing config: C:\Users\Hatsune Miku\.jupyter - Validating... jupyter_nbextensions_configurator 0.4.0 ok Enabling notebook nbextension nbextensions_configurator/config_menu/main... Enabling tree nbextension nbextensions_configurator/tree_tab/main... [I 14:26:29 InstallContribNbextensionsApp] Enabling notebook extension contrib_nbextensions_help_item/main... [I 14:26:29 InstallContribNbextensionsApp] - Validating: ok [I 14:26:29 InstallContribNbextensionsApp] - Editing config: C:\Users\Hatsune Miku\.jupyter\jupyter_nbconvert_config.json [I 14:26:29 InstallContribNbextensionsApp] -- Configuring nbconvert template path [I 14:26:29 InstallContribNbextensionsApp] -- Configuring nbconvert preprocessors [I 14:26:29 InstallContribNbextensionsApp] - Writing config: C:\Users\Hatsune Miku\.jupyter\jupyter_nbconvert_config.json [I 14:26:29 InstallContribNbextensionsApp] -- Writing updated config file C:\Users\Hatsune Miku\.jupyter\jupyter_nbconvert_config.json ``` 启动jupyter jupyter notebook ``` [W 14:26:48.022 NotebookApp] Terminals not available (error was No module named 'winpty.cywinpty') [I 14:26:48.053 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.4.0 [I 14:26:48.053 NotebookApp] Serving notebooks from local directory: G:\Python\jupyter-workspace [I 14:26:48.053 NotebookApp] The Jupyter Notebook is running at: [I 14:26:48.053 NotebookApp] http://localhost:8888/?token=7ca3b607fd4757bf076262a5ce84ba22f5634803a7f615db [I 14:26:48.053 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 14:26:48.100 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=7ca3b607fd4757bf076262a5ce84ba22f5634803a7f615db [I 14:26:48.537 NotebookApp] Accepting one-time-token-authenticated connection from ::1 ``` ![图片说明](https://img-ask.csdn.net/upload/201809/30/1538289068_732624.png) 没有nbextensions标签 请问要怎么解决这个问题,已经重新安装jupyter_contrib_nbextensions很多次了
©️2020 CSDN 皮肤主题: 成长之路 设计师:Amelia_0503 返回首页