美文网首页
0--linux下安装conda

0--linux下安装conda

作者: 徐沫沫 | 来源:发表于2019-07-14 22:45 被阅读0次
    软件管理Miniconda----相当于App store
    • 下载
    1. 浏览器搜索“miniconda”网站,复制python3.7对应的版本下载链接;
      [https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh]
    image.png
    1. Linux下,输入 wget 和链接,回车下载:
    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
    
    1. 下载完成后安装:
    bash Miniconda3-latest-Linux-x86_64.sh 
    

    按提示操作,有需要的地方输入yes;

    1. 激活conda:
    source ~/.bashrc
    
    1. 测试是否安装成功:输入conda会出现参数等信息,说明成功;
    • 添加国内镜像
      加速conda下载速度,使用国内镜像源:
    1. 中国科大开源镜像站(mirrors.ustc.edu.cn),复制粘贴输入以下代码
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
    conda config --set show_channel_urls yes
    
    1. 清华镜像站(mirrors.tuna.tsinghua.edu.cn),复制粘贴输入以下代码
    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
    1. 查看当前所有软件列表,命令: conda list
    2. 搜索软件命令: conda search 软件名
      例fastqc : conda search fastqc
    3. 安装软件,命令: conda install fastqc -y
      参数 -y 是自动安装
      可安装指定版本,默认安装最新版本
    4. 卸载软件,命令: conda remove fastqc -y
    • conda环境
    1. 查看当前conda有哪些环境,命令:conda info --envs
      前面带*的就是默认的


      image.png
    2. 新建立conda环境,然后指定python版本是3:
      conda create -n ChIP-seq python=3
      如果想要将conda更新至新版本:

    conda update -n base -c defaults conda
    

    environment location: /data/xuyongxin/miniconda3/envs/ChIP-seq

    1. 激活新的conda环境:
      source activate ChIP-seq
      这时默认的*就会转移到ChIP-seq前面,用户名root前面出现了(ChIP-seq);
    2. 安装软件fastqc、trimmomatic,可以和建立环境一起进行:
      conda create -n ChIP-seq python=3 fastqc trimmomatic -y
    3. 卸载某环境中的软件
      conda remove -n ChIP-seq fastqc -y
    4. 卸载环境(全部卸载)
      conda remove -n ChIP-seq --all
    5. 退出当前环境
      source deactivate

    相关文章

      网友评论

          本文标题:0--linux下安装conda

          本文链接:https://www.haomeiwen.com/subject/qgtwkctx.html