swin-transformer安装mmcv-full

首先swin-T要求mmcv版本不能高于1.4.0,所以一些安装就不能像mmcv官网安装的那么随意,首先是查看自己的cuda,安装torch。在安装torch前,应该先参看此种cuda+torch组合下是否有mmcv-full1.4.0的安装包。比如
https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html 中发现并没有1.4.0版本的mmcv-full起步版本都已经1.4.7了。如果此时强行安装,
pip install mmcv-full
1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html
会出出现卡在
Building wheels for collected packages: mmcv-full
Building wheel for mmcv-full (setup.py) … |
然后报红字

ERROR: Command errored out with exit status 1:
     command: /opt/conda/envs/py38/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2psi4unb/mmcv-full_b11880bea60e40aaad9c911705dc22a7/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2psi4unb/mmcv-full_b11880bea60e40aaad9c911705dc22a7/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4h9_exl4/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/envs/py38/include/python3.8/mmcv-full

此时应该下拉mmcv官网上,看看cuda11.3这一行其他torch版本的网址下是否有,https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.0/index.html,发现torch10.0是有的,于是选择cuda11.3+torch10.0的组合并进行安装

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值