conda配置solov2环境


运行环境:Ubuntu 18.04

conda安装

下载

conda下载网址:https://www.anaconda.com/products/individual
根据需要选则版本下载。
我下载conda的方法如下:

  1. wget下载 wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
  2. aria2c下载 aria2c https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
    推荐aria2c下载。

安装

参考教程

chmod +x Anaconda3-2020.11-Linux-x86_64.sh
./Anaconda3-2020.11-Linux-x86_64.sh
# 安装过程一直yes。

启动环境

cd  anaconda3/bin
chmod +x activate
. activate 
# 相当于source activate

添加channels

添加清华镜像(参考网址),修改~/.condarc:

channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

运行 conda clean -i 清除索引缓存,保证用的是镜像站提供的索引。
显示安装好的channels

conda config --set show_channel_urls yes
conda config --get channels

退出conda环境

. ./deactivate
## 或者用 
conda deactivate

pip 设置清华源

pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

配置solov2环境

参考教程

# 创建虚拟环境
conda create -n solo python=3.7 -y
conda activate solo

#安装 pytorch==1.4.0 torchvision==0.5.0  试了别的1.7.0啥的都没成功
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch

#安装opencv-python
pip install opencv-python

#安装mmcv,安装参考官方https://github.com/open-mmlab/mmcv/tree/v0.2.16
pip install mmcv-full 

#安装mmdection,安装命令参考官方https://github.com/open-mmlab/mmdetection 1.0.0
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
pip install -v -e .  # or "python setup.py develop"

#SOLO  参考https://github.com/WXinlong/SOLO/blob/master/docs/INSTALL.md
git clone https://github.com/WXinlong/SOLO.git
cd SOLO
pip install -r requirements/build.txt     #solo文件中在requirements文件夹中将torch版本相关注释掉,防止重新安装,上面已经安装了1.4.0了
## 由于有墙,一直失败,后来该车为gitee仓库
pip install "git+https://gitee.com/wsyin/cocoapi.git#subdirectory=PythonAPI"
pip install -v -e .  # or "python setup.py develop"

pytorch和torchvision下载:

aria2c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/torchvision-0.5.0-py37_cu101.tar.bz2
aria2c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/pytorch-1.4.0-py3.7_cuda10.1.243_cudnn7.6.3_0.tar.bz2

安装

conda install --use-local pytorch-1.4.0-py3.7_cuda10.1.243_cudnn7.6.3_0.tar.bz2
conda install --use-local torchvision-0.5.0-py37_cu101.tar.bz2
  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值