马春杰杰博客
致力于深度学习经验分享!

[mcj]”ImportError: cannot import name ‘_C'”

文章目录
[隐藏]

出现:"ImportError: cannot import name '_C'",请build并且install detectron2

安装方法:

Requirements

  • Linux or macOS
  • Python ≥ 3.6
  • PyTorch ≥ 1.3
  • torchvision that matches the PyTorch installation. You can install them together at pytorch.org to make sure of this.
  • OpenCV, optional, needed by demo and visualization
  • pycocotools: pip install cython; pip install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
  • gcc & g++ ≥ 4.9

具有以上依赖性之后,运行:

一般来说,重装pytorch之后,需要重新安装detectron2.

本文最后更新于2020年1月20日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!

如果你对这篇文章有什么疑问或建议,欢迎下面留言提出,我看到会立刻回复!

打赏
未经允许不得转载:马春杰杰 » [mcj]”ImportError: cannot import name ‘_C'”

留个评论吧~ 抢沙发 评论前登陆可免验证码!

私密评论
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址(选填,便于回访^_^)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

登录

忘记密码 ?

切换登录

注册