1. 安装Miniconda3的步骤
-
去官网下载安装文件:Miniconda — Conda中的MacOSX-x86_64-bit (bash installer),可选择python3或python2.
wget -c -t o https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
-
下载后,可执行并安装:
chmod a+x Miniconda3-latest-MacOSX-x86_64.sh ./Miniconda3-latest-MacOSX-x86_64.sh
-
安装成功后,把路径写入bashrc或zshrc的环境变量中:
vi ~/.zshrc export PATH="/Users/deng/miniconda3/bin:${PATH}"
-
然后输入source命令:
source ~/.zshrc
-
检验是否安装成功:
conda list
-
显示大致以下命令表示安装成功:
# packages in environment at /Users/deng/miniconda3: # # Name Version Build Channel asn1crypto 0.24.0 py37_0 bzip2 1.0.8 h1de35cc_0 ca-certificates 2019.5.15 0 certifi 2019.6.16 py37_0 cffi 1.12.3 py37hb5b8e2f_0 chardet 3.0.4 py37_1 conda 4.7.10 py37_0 conda-package-handling 1.3.11 py37_0 cryptography 2.7 py37ha12b0ac_0 idna 2.8 py37_0 libarchive 3.3.3 h786848e_5 libcxx 4.0.1 hcfea43d_1 libcxxabi 4.0.1 hcfea43d_1 libedit 3.1.20181209 hb402a30_0 libffi 3.2.1 h475c297_4 libiconv 1.15 hdd342a3_7 libxml2 2.9.9 hf6e021a_1 lz4-c 1.8.1.2 h1de35cc_0 lzo 2.10 h362108e_2 ncurses 6.1 h0a44026_1 openssl 1.1.1c h1de35cc_1 pip 19.1.1 py37_0 pycosat 0.6.3 py37h1de35cc_0 pycparser 2.19 py37_0 pyopenssl 19.0.0 py37_0 pysocks 1.7.0 py37_0 python 3.7.3 h359304d_0 python-libarchive-c 2.8 py37_11 python.app 2 py37_9 readline 7.0 h1de35cc_5 requests 2.22.0 py37_0 ruamel_yaml 0.15.46 py37h1de35cc_0 setuptools 41.0.1 py37_0 six 1.12.0 py37_0 sqlite 3.29.0 ha441bb4_0 tk 8.6.8 ha441bb4_0 tqdm 4.32.1 py_0 urllib3 1.24.2 py37_0 wheel 0.33.4 py37_0 xz 5.2.4 h1de35cc_4 yaml 0.1.7 hc338f04_2 zlib 1.2.11 h1de35cc_3 zstd 1.3.7 h5bba6e5_0
2. 安装Bioconda
-
添加channels:
conda config --add channels conda-forge conda config --add channels defaults conda config --add channels r conda config --add channels bioconda conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/ conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/ conda config --set show_channel_urls yes
-
查看已经添加的channels:
conda config --get channels
-
创建名为bioinfo的环境
conda create -y --name bioinfo python=3
-
激活bioinfo环境
source activate bioinfo
-
更新miniconda
conda update conda
网友评论