日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

【Python】conda使用指南

系統 1943 0

Backto Python Index.

1. 安裝 Installation

官網,

國內鏡像源

清華最方便,

            
              conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
# 顯示源地址
conda config --set show_channel_urls yes

            
          

但是清華園因版權問題中間關閉過,
, 備選 中科大源

            
              conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes

            
          

隨系統啟動 Open/Close

            
              conda config --set auto_activate_base false

            
          

2. 常用指令

            
              
                # create env
              
              
conda create 
              
                -
              
              
                -
              
              name
              
                =
              
              xxx python
              
                =
              
              
                3.6
              
              
                # list all available envs
              
              
conda info 
              
                -
              
              e


              
                # activate env
              
              
conda activate xxx


              
                # deactivate env
              
              
conda deactivate


              
                # list all packages in current env
              
              
conda 
              
                list
              
              
                # install a new package
              
              
conda install pytorch
              
                =
              
              
                0.4
              
              
                .0
              
               cuda92 
              
                -
              
              c pytorch 


              
                # to clone an env
              
              
conda create 
              
                -
              
              
                -
              
              name
              
                =
              
              AAA 
              
                -
              
              
                -
              
              clone
              
                =
              
              BBB


              
                # to delete an env
              
              
conda env remove 
              
                -
              
              n ENV_NAME

            
          

3. 關鍵包的安裝

            
              
                # mostly used
              
              
conda 
              
                install
              
               numpy scipy pandas matplotlib pillow


              
                # to install tensorboardx
              
              
conda 
              
                install
              
               -c conda-forge tensorboardx 


              
                # to install easydict
              
              
conda 
              
                install
              
               -c conda-forge easydict 


            
          

不要使用 conda install opencv ,因為安裝內容不全,比如VideoCapture 讀視頻都不行。使用 pip

            
              pip 
              
                install
              
               opencv-python opencv-contrib-python

            
          

不要使用 conda install tensorflow-gpu , 因為官方不給版本更新。使用 pip

            
              pip 
              
                install
              
               tensorflow-gpu

            
          

4. Env 組織

按版本組織

            
              -pyVvv_base(clean)
	- pyVvv_base_cv(numpy, scipy, opencv, matplotlib, )


            
          

Ref

  • Anaconda使用總結暨部署python2和python3共存
  • Anaconda多環境多版本python配置指導

更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 吉安市| 嫩江县| 新晃| 呼伦贝尔市| 称多县| 北京市| 长泰县| 鸡东县| 阿巴嘎旗| 禄劝| 石泉县| 辉县市| 南宫市| 古浪县| 黑河市| 高要市| 陇南市| 繁峙县| 琼结县| 西丰县| 黔江区| 永登县| 同德县| 延寿县| 嫩江县| 西青区| 玛沁县| 周至县| 册亨县| 罗源县| 万载县| 霍山县| 吕梁市| 平安县| 即墨市| 盘锦市| 梁河县| 商丘市| 清苑县| 恩施市| 佛学|