Backto Python Index.
1. 安裝 Installation
官網(wǎng),
國內(nèi)鏡像源
清華最方便,
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
但是清華園因版權(quán)問題中間關(guān)閉過,
, 備選 中科大源
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
隨系統(tǒng)啟動(dòng) 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. 關(guān)鍵包的安裝
# 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
,因?yàn)榘惭b內(nèi)容不全,比如VideoCapture 讀視頻都不行。使用
pip
pip
install
opencv-python opencv-contrib-python
不要使用
conda install tensorflow-gpu
, 因?yàn)楣俜讲唤o版本更新。使用
pip
pip
install
tensorflow-gpu
4. Env 組織
按版本組織
-pyVvv_base(clean)
- pyVvv_base_cv(numpy, scipy, opencv, matplotlib, )
Ref
- Anaconda使用總結(jié)暨部署python2和python3共存
- Anaconda多環(huán)境多版本python配置指導(dǎo)
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯(lián)系: 360901061
您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
