ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory,mmdet安装报

@ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory

ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory

安装mmdet出错
以文章 链接: https://github.com/hustvl/TeViT/tree/main 为例
torch1.9.0
torchvision
0.10.0
mmcv==1.4.8
pip install -r requirements.txt

安装torch torchvision时一定要记住时按章cuda10.2,(我报错的原因就是因为装的是cuda11.3)github前面说了,没注意导致后面mmcv和mmdet一直报错
指定mmcv版本安装

pip install mmcv-full==1.4.8 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.9.0/index.html

指定mmdet版本安装(错误方法,他指定了只能按照文档介绍的方式安装,不能用pip)

pip install mmdet==2.23.0

正确方法:注意一定要按照顺序,先手动安装MMDetection,再回头上一层文件夹,执行下面的命令
在这里插入图片描述

pip install git+https://github.com/youtubevos/cocoapi.git#"egg=pycocotools&subdirectory=PythonAPI

安装之前强制更新了一下conda要不然一直报setuptools那个错误,

conda update --force conda
conda install -c conda-forge cxx-compiler

gcc安装 c-compiler

每个环境得gcc和g++不一样

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值