Jupyter Notebook安裝jupyter_contrib_nbextension自動補pytorch代碼

jupyter_contrib_nbextension是Jupyter Notebook的一個擴展插件,裏面集成了很多擴展功能,但是按照網上方法安裝配置後,打開notebook總是未顯示Nbextensions的標籤:

開始安裝後,查看pip list,插件都安裝成功了,但是打開只有左邊原始三個標籤,Nbextensions的標籤一直未顯示出來,嘗試了以下三種方法,但是都沒有成功:

  1. 卸載了重新安裝,重新配置,未成功
  2. 更換瀏覽器,通過密碼登陸,未成功
  3. 打開http://localhost:8888/nbextensions?nbextension=toc2/main頁面的方式,但是顯示404 : Not Found You are requesting a page that does not exist!
    以上方法是參考以下兩個連接,但是未成功,有人成功了,你們也可以試一下:
    https://ask.csdn.net/questions/701471
    https://blog.csdn.net/qq_34705900/article/details/80197956
    在這裏插入圖片描述
    **

劃重點,本人成功安裝方法步驟:

最後仔細閱讀了官方文件,採用以下步驟成功安裝顯示了,安裝命令可能會發生變化,你們如果安裝失敗,可以查看官方文檔,裏面有詳細步驟:
官方安裝文檔地址:
https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/README.md

**
安裝步驟:
如果你已經安裝了,先執行卸載命令:

pip uninstall jupyter_contrib_nbextensions
pip uninstall jupyter_nbextensions_configurator
  • 1
  • 2
  1. 打開Anaconda Prompt窗口,執行第一個命令,用於安裝nbextensions:
pip install jupyter_contrib_nbextensions
  • 1
  1. 再執行第二個命令,用於安裝 javascript and css files
jupyter contrib nbextension install --user
  • 1
  1. 最後執行,用於安裝configurator
pip install jupyter_nbextensions_configurator
  • 1

然後重新啓動Jupyter Notebook後,就會發現已經有Nbextensions標籤了。

常用擴展功能,勾選上即可:
最常用功能說明,建議勾選上:
Collapsible headings 摺疊標題
Notify 通知機制,跑一些耗時較久的任務,完成後通知
Codefolding 摺疊代碼
Zen mode extension 隱藏活動狀態欄,方便注意代碼
Execute time extension 顯示運行的時間

                                </div>
            <link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-b6c3c6d139.css" rel="stylesheet">
                                <div class="more-toolbox">
            <div class="left-toolbox">
                <ul class="toolbox-list">
                    
                    <li class="tool-item tool-active is-like "><a href="javascript:;"><svg class="icon" aria-hidden="true">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#csdnc-thumbsup"></use>
                    </svg><span class="name">點贊</span>
                    <span class="count">13</span>
                    </a></li>
                    <li class="tool-item tool-active is-collection "><a href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;popu_824&quot;}"><svg class="icon" aria-hidden="true">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-csdnc-Collection-G"></use>
                    </svg><span class="name">收藏</span></a></li>
                    <li class="tool-item tool-active is-share"><a href="javascript:;"><svg class="icon" aria-hidden="true">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-csdnc-fenxiang"></use>
                    </svg>分享</a></li>
                    <!--打賞開始-->
                                            <!--打賞結束-->
                                            <li class="tool-item tool-more">
                        <a>
                        <svg t="1575545411852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M179.176 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5718"></path><path d="M509.684 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5719"></path><path d="M846.175 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5720"></path></svg>
                        </a>
                        <ul class="more-box">
                            <li class="item"><a class="article-report">文章舉報</a></li>
                        </ul>
                    </li>
                                        </ul>
            </div>
                        </div>
        <div class="person-messagebox">
            <div class="left-message"><a href="https://blog.csdn.net/u011318077">
                <img src="https://profile.csdnimg.cn/7/C/1/3_u011318077" class="avatar_pic" username="u011318077">
                                        <img src="https://g.csdnimg.cn/static/user-reg-year/1x/6.png" class="user-years">
                                </a></div>
            <div class="middle-message">
                                    <div class="title"><span class="tit"><a href="https://blog.csdn.net/u011318077" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;}" target="_blank">夏樹柏</a></span>
                                        </div>
                <div class="text"><span>發佈了174 篇原創文章</span> · <span>獲贊 176</span> · <span>訪問量 14萬+</span></div>
            </div>
                            <div class="right-message">
                                        <a href="https://im.csdn.net/im/main.html?userName=u011318077" target="_blank" class="btn btn-sm btn-red-hollow bt-button personal-letter">私信
                    </a>
                                                        <a class="btn btn-sm  bt-button personal-watch" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;}">關注</a>
                                </div>
                        </div>
                </div>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章