MMDetection安装问题

问题一:Install MMDetection报错

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html

本人环境
cu_version10.1 (输入nvcc -V命令,即可查询到CUDA版本号。)
torch_version1.10.2

mmcv-full is only compiled on PyTorch 1.x.0 because the compatibility
usually holds between 1.x.0 and 1.x.1. If your PyTorch version is
1.x.1, you can install mmcv-full compiled with PyTorch 1.x.0 and it usually works well.
https://github.com/open-mmlab/mmcv#installation

 pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.10.0/index.html

出现报错
在这里插入图片描述在这里插入图片描述
查看了一下 PyTorch 和 CUDA 版本组合,发现没有我们对应的版本,降低torch版本,将1.10.2降为1.8.1
https://github.com/open-mmlab/mmcv/blob/master/README_zh-CN.md
在这里插入图片描述

整体步骤:

#1.Prepare environment
conda create -n openmmlab python=3.7 -y
conda activate openmmlab
conda install pytorch=1.8.1 cudatoolkit=10.1 torchvision -c pytorch
#2.Install mmcv-full.
 pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.8.0/index.html
#3.Install MMDetection.
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"

问题二 fatal: unable to access…

在git下载项目时遇到问题:

fatal: unable to access 'https://github.com/open-mmlab/mmdetection.git/': gnutls_handshake() failed: A TLS packet with unexpected length was received.

解决方案:
将https改为git重新执行

git clone git://github.com/open-mmlab/mmdetection.git

问题三:ImportError: cannot import name ‘PILLOW_VERSION’ from ‘PIL’

方法2.根据报错的最后一行提示,打开function.py文件,使用from PIL import Image, ImageOps, ImageEnhance, version 替换文件中from PIL import Image, ImageOps, ImageEnhance,PILLOW_VERSION这句。

参考解决方案:https://blog.csdn.net/Lee_lg/article/details/103901632

当cuda 11
https://pytorch.org/get-started/previous-versions/

conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch

镜像问题https://blog.csdn.net/weixin_49304494/article/details/122622134

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值