學習筆記-機器學習-搭建環境-1:安裝Anaconda和Jupyter Notebook(Win10)

一、安裝Anaconda

## 鏡像源已經不可用

從清華大學開源軟件鏡像站下載合適版本的Anaconda3速度很快,地址:

https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/

爲Anaconda營造一個相對獨立的環境,不選擇添加到PATH環境變量中,而應使用Anaconda軟件,從“開始”菜單打開“Anaconda Navigator或“Anaconda Prompt”。

# 配置鏡像地址
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

# 查看是否安裝成功
conda  --version

# 更新
conda update conda
conda upgrade --all

二、安裝jupyter notebook插件:notedown

這個時候如果直接運行"jupyter notebook"會報錯:

[C 18:49:50.816 NotebookApp] Bad config encountered during initialization:
[C 18:49:50.816 NotebookApp] The 'contents_manager_class' trait of a NotebookApp instance must be a subclass of 'notebook.services.contents.manager.ContentsManager', but a value of class 'traitlets.traitlets.MetaHasTraits' (i.e. <class 'notedown.contentsmanager.NotedownContentsManager'>) was specified.

下面安裝 notedown 插件,運行 Jupyter 筆記本並加載插件:

pip install https://github.com/mli/notedown/tarball/master
jupyter notebook --NotebookApp.contents_manager_class='notedown.NotedownContentsManager'

成功打開jupyter notebook:

每次運行jupyter notebook時默認開啓notedown插件:

jupyter notebook --generate-config

打開新創建的文件,將下一行加入配置文件末尾:

c.NotebookApp.contents_manager_class = 'notedown.NotedownContentsManager'

之後,我們只要運行:

jupyter notebook

即可默認開啓notedown插件。

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章