jupyter notebook 寫程式碼自動補全的實現
阿新 • • 發佈:2020-11-03
操作步驟
進入命令列環境。我使用的是conda。有兩種方式進入命令列。
方法1:通過anconda navigator介面,選擇environments,選擇對應環境名,選擇open terminal
方法2:直接使用cmd或者terminal等終端進入命令列。啟用你想要配置程式碼補全的環境(如果是預設環境不用啟用)
1.安裝nbextensions
pip install jupyter_contrib_nbextensions -i https://pypi.mirrors.ustc.edu.cn/simple jupyter contrib nbextension install --user
2.安裝nbextensions_configurator
pip install --user jupyter_nbextensions_configurator jupyter nbextensions_configurator enable --user
如果提示缺少依賴,就使用pip安裝對應依賴即可。
重啟jupyter,在彈出的主頁面裡,能看到增加了一個Nbextensions標籤頁,在這個頁面裡,勾選Hinterland即啟用了程式碼自動補全,開啟一個notebook感受一下吧。
如果出現錯誤如下:
Installing collected packages: msgpack
Could not install packages due to an EnvironmentError: [WinError 5] 拒絕訪問。:
'E:\\JiangHeSong\\Anaconda35.2.0\\Lib\\site-packages\\msgpack\\_packer.cp36-win_
amd64.pyd'
Consider using the `--user` option or check the permissions.You are using pip version 10.0.1,however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
只需要加一個--user 例如:
pip install --user msgpack -i https://pypi.mirrors.ustc.edu.cn/simple
既可以正常安裝!!!
到此這篇關於jupyter notebook 寫程式碼自動補全的實現的文章就介紹到這了,更多相關jupyter notebook 自動補全內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!