open-mmlab / mmcv

OpenMMLab Computer Vision Foundation
https://mmcv.readthedocs.io/en/latest/
Apache License 2.0
5.92k stars 1.66k forks source link

[Bug] modelscope库里有mmcv2.1.0中删除掉的部分,导致运行报错,求助 #2988

Closed zhangdanfeng888 closed 1 year ago

zhangdanfeng888 commented 1 year ago

Prerequisite

Environment

这是我当前项目的python环境和mmcv版本: image image

Reproduces the problem - code sample

在虚拟环境的site-packages/modelscope/models/cv/face_detection/scrfd目录中,scrfd_detect.py中有部分代码调用了以前版本的mmcv image

Reproduces the problem - command or script

当我运行包含上述脚本程序后,from mmcv import Config这行会报错。

Reproduces the problem - error message

![Uploading image.png…]()

Additional information

我知道这句话怎么修改,改为from mmengine.config import Config即可。 但是下面的几行调用mmcv的代码,因为有的方法已经被删除了,我应该怎么修改?

zhangdanfeng888 commented 1 year ago

另外,如果我使用pip install openmim mim install "mmcv-full<2.0.0"安装低版本的mmcv-full,则会报错: error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mmcv-full Running setup.py clean for mmcv-full Failed to build mmcv-full ERROR: Could not build wheels for mmcv-full, which is required to install pyproject.toml-based projects ![Uploading image.png…]()

zhangdanfeng888 commented 1 year ago

重装11.7版本的cuda和117的pytorch,再mim install mmcv-full==1.7.0,问题已解决