Anaconda換源及經常使用命令

  推薦一篇文章:http://www.cnblogs.com/IT-LearnHall/p/9486029.htmlhtml

  另外,記錄幾個本身遇到的問題 python

  首先是換源。不管是安裝包仍是安裝後更新python包,從官網下載都是龜速,建議從清華大學鏡像站直接下載。windows

     顯示鏡像源:url

    conda config --show channelspa

     添加新的鏡像htm

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/blog

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/(雖然不明白爲何,可是要加這一句,下載速度提高顯著)ip

    conda config --set show_channel_urls yes rem

     刪除舊鏡像源class

    conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

  使用幫助傳送門:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/

  清華鏡像站地址:https://mirrors.tuna.tsinghua.edu.cn/

  安裝過程高級選項會提示註冊環境變量的問題,勾選第二個選項也就是register 選項的時候,提示我本機有其餘版本python。因此我選擇的第一個選項添加環境變量。本想把原有python集成到Anaconda下,可是網上的更換文件夾以及修改配置文件的方法不可行。最終仍是卸載原有python,以anaconda爲主。

  windows下anaconda幾個命令:

    conda update conda   升級conda

    conda update --all      升級當前環境下全部的包

    conda install package_name 安裝名爲「package_name"的包

    conda remove package_name 移除名爲「package_name"的包

    conda create -n py2 python=2  建立名爲py2的環境,python版本爲python2中的最新版本

    conda info -e   顯示現有的全部環境

    activate  environment_name  激活名爲environment_name的環境

    deactivate  退出當前環境

    python -m ipykernel install --name tensorflow  爲notebook增長內核

相關文章
相關標籤/搜索