學習python和人工智能的相關課程時安裝了Anaconda3,想在Jupyter notebook中概括整理筆記,爲了方便往後查找想安裝目錄(Table of Contents, TOC)插件,查找了安裝方法,但在 jupyter_contrib_nbextensions插件安裝過程當中遇到不少問題,python
版本信息:Anaconda3-2020.02(python3.7),本人操做系統Win7旗艦版 64bitgit
嘗試多種安裝方法,整理以下:github
步驟1、安裝Jupyter notebook extensions工具
嘗試了三種方法才安裝成功! -_-||學習
方法一:使用conda安裝網站
conda install -c conda-forge jupyter_contrib_nbextensions人工智能
修改了安裝源:url
1)conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msy/spa
2)conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/con /操作系統
3)conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
4)conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pty/
conda config --set show_channel_urls yes
conda config --show-sources #查看當前使用源
從新執行命令,反覆安裝剩下的一項不少次,仍然失敗,進度始終在10%--50%左右。
因而更換另外一種方法。。
方法二:使用pip3安裝
pip3 --default-timeout=100 install jupyter_contrib_nbextensions -i https://pypi.tuna.tsinghua.edu.cn/simple/
分別經過豆瓣、清華源下載安裝,老是卡在下圖這個地方超時。網上查詢方法主要是這兩種,都有安裝成功的。我開始懷疑是否是個人電腦內存不足啊。。
因而更換第三種方法。
方法三:從下面網站下載了jupyter_contrib_nbextensions的 tar.gz包,安裝
https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
一、進入安裝包目錄下,執行 D:\Anaconda3\python.exe setup.py install ,終於安裝成功了,我太不容易了 。。。。
上述三種方法只是安裝完Jupyter notebook extensions,尚未結束,須要繼續後面的幾步操做。
步驟2、執行 Jupyter contrib nbextension install --user
步驟3、從新啓動Jupyter Notebook,能夠看到插件的Tab籤。
Table of Contents 左側顯示目錄結構
Collapsible Headings 標題可摺疊
步驟4、打開notebook文檔,工具欄右側多了一個顯示目錄樹的按鈕,點擊後能夠查看到左側的標題顯示,標題能夠摺疊。
(^-^)V