win10安装mmcv

对着这个来,绝对成功:
这个不需要安装vs,我前面安装vs啥的那一套还是不行……
Windows 10 mmcv-full 1.3.13 安装记录
需要注意:如果其他环境都有了,那就直接下载,mmcv的工程,然后用python编译就可以,编译完成后直接使用pip list查看安装了没有,作者提到的show方式我没有运行成功。

这是安装成功后的照片:在这里插入图片描述
用这段代码测试一下,不报错就是没问题:

import numpy as np
import torch

from mmcv.ops import box_iou_rotated


def check_installation():
    """Check whether mmcv-full has been installed successfully."""
    np_boxes1 = np.asarray(
        [[1.0, 1.0, 3.0, 4.0, 0.5], [2.0, 2.0, 3.0, 4.0, 0.6],
         [7.0, 7.0, 8.0, 8.0, 0.4]],
        dtype=np.float32)
    np_boxes2 = np.asarray(
        [[0.0, 2.0, 2.0, 5.0, 0.3], [2.0, 1.0, 3.0, 3.0, 0.5],
         [5.0, 5.0, 6.0, 7.0, 0.4]],
        dtype=np.float32)
    boxes1 = torch.from_numpy(np_boxes1)
    boxes2 = torch.from_numpy(np_boxes2)

    # test mmcv-full with CPU ops
    box_iou_rotated(boxes1, boxes2)

    # test mmcv-full with both CPU and CUDA ops
    if torch.cuda.is_available():
        boxes1 = boxes1.cuda()
        boxes2 = boxes2.cuda()

        box_iou_rotated(boxes1, boxes2)

if __name__ == '__main__':
    check_installation()

哈哈哈,不行又报错了!!!意外不~
在这里插入图片描述
打开这个github:

https://github.com/open-mmlab/mmcv/blob/master/README_zh-CN.md

我的cuda是11.1,torch是1.9的,直接用了这句指令就安装好了。
在这里插入图片描述
这是好了的截图:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AIOT魔法师

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值