【SOLO】ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for ...

按照官网的教程安装mmcv
官网链接:https://github.com/open-mmlab/mmcv/tree/v0.2.16

git clone https://github.com/open-mmlab/mmcv.git
cd mmcv
pip install -e . #安装轻量版本
MMCV_WITH_OPS=1 pip install -e . #安装完整版full version

在这里插入图片描述

在执行最后一步时出现如下错误:

Looking in indexes: http://pypi.douban.com/simple/
Obtaining file:///data2/likai/SOLO
    ERROR: Command errored out with exit status 1:
     command: /data2/likai/anaconda3/envs/solo/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/data2/likai/SOLO/setup.py'"'"'; __file__='"'"'/data2/likai/SOLO/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'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-r4mscmvu
         cwd: /data2/likai/SOLO/
    Complete output (10 lines):
    /data2/likai/anaconda3/envs/solo/lib/python3.7/site-packages/torch/cuda/__init__.py:52: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 10010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at  /opt/conda/conda-bld/pytorch_1623448224956/work/c10/cuda/CUDAFunctions.cpp:115.)
      return torch._C._cuda_getDeviceCount() > 0
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/data2/likai/SOLO/setup.py", line 251, in <module>
        sources=['src/compiling_info.cpp']),
      File "/data2/likai/SOLO/setup.py", line 103, in make_cuda_ext
        raise EnvironmentError('CUDA is required to compile MMDetection!')
    OSError: CUDA is required to compile MMDetection!
    No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-10.1'
    ----------------------------------------
WARNING: Discarding file:///data2/likai/SOLO. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

原因:其实是mmcv的依赖项未建立,主要有:pytest-runner pytest addict numpy pyyaml yapf opencv-python

pip install pytest-runner pytest addict numpy pyyaml yapf opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple

再次运行指令

pip install -e . #安装轻量版本
MMCV_WITH_OPS=1 pip install -e . #安装完整版full version

或者

python setup.py install

就可以正常安装了
在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值