jupyter notebook 进阶使用:nbextensions,终极避坑
jupyter notebook 进阶使用:nbextensions,终极避坑
- 吐槽
- 安装 jupyter_contrib_nbextensions
- 1. Install the python package(安装python包)
- 方法一,PIP:
- 方法二,Conda(推荐):
- 方法三,git clone(推荐)
- 2. Install javascript and css files(安装 javascript and css文件)
- 3. 安装jupyter_nbextensions_configurator服务器扩展
吐槽
我真的太难了,就因为这个jupyter_contrib_nbextensions,我不但花了一下午时间安装jupyter,而且误删了我的环境,我真的要吐了,不过我通过访问国外的网站,找到了解决方法!!!
安装 jupyter_contrib_nbextensions
1. Install the python package(安装python包)
方法一,PIP:
pip install jupyter_contrib_nbextensions
或者
pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
方法二,Conda(推荐):
conda install -c conda-forge jupyter_contrib_nbextensions
用这个方法就不用接下来的操作了,一步搞定!!!
方法三,git clone(推荐)
git clone https://github.com/ipython-contrib/jupyter_contrib_nbextensions.git
然后再执行
pip install -e jupyter_contrib_nbextensions
2. Install javascript and css files(安装 javascript and css文件)
这一步将nbextensions的javascript和css文件复制到jupyter服务器的搜索目录中,并编辑一些jupyter配置文件。为此提供了一个jupyter子命令。
jupyter contrib nbextension install --user
–user:来安装到用户的jupyter主目录下。
3. 安装jupyter_nbextensions_configurator服务器扩展
jupyter nbextensions_configurator enable --user
总的来说就是 conda install -c conda-forge jupyter_contrib_nbextensions
一步搞定,不需要第二,三步