anaconda python 經常使用庫安裝

Switch to Chinese conda Source, config file is in ~/.condarcpython

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

 

Switch to Chinese pip Source, it's contents here:linux

  • linux config file is in ~/.pip/pip.confshell

  • windows config file is in %HOMEPATH%\pip\pip.ini, windows

[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com

 

Update Anacondabash

conda update conda -y
conda update anaconda -y
conda update python -y
conda update --all -y

 

Install the conda packages

conda install --file=requirements_conda.txt

其中,requirements_conda.txt中內容相似以下,每一行表明一個庫,能夠指定安裝的版本號(例如numpy=1.11),默認安裝最新版:ui

tensorflow
keras
ipykernel
cython
numpy
matplotlib
scipy
Pillow
opencv
pandas
seaborn

 

Install the pip packages

 pip install -r requirements_pip.txt

其中,requirements_pip.txt中內容相似以下,每一行表明一個庫,能夠指定安裝的版本號(例如numpy=1.11),默認安裝最新版:url

cython
numpy
matplotlib
scipy
Pillow
image
easydict
opencv-python
sklearn
bunch
tqdm
common
lap
imagehash
ipywidgets
labelme
scikit-image
Augmentor
imgaug

 

shell腳本spa

#!/bin/bash

source ~/.bashrc.with_anaconda3

conda activate tf

conda install --file=requirements_conda.txt -y
pip install -r requirements_pip.txt
相關文章
相關標籤/搜索