open-mmlab / mmcv

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

[Bug] 遇到了奇怪的问题,同样版本的mmcv在modelscope虚拟环境ok,本地报错 #3000

Open tigflanker opened 11 months ago

tigflanker commented 11 months ago

Prerequisite

Environment

{'sys.platform': 'linux', 'Python': '3.8.18 (default, Sep 11 2023, 13:40:15) [GCC 11.2.0]', 'CUDA available': False, 'GCC': 'gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)', 'PyTorch': '2.0.1+cu117', 'PyTorch compiling details': 'PyTorch built with:\n - GCC 9.3\n - C++ Version: 201703\n - Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v2.7.3 (Git Hash 6dbeffbae1f23cbbeae17adb7b5b13f1f37c080e)\n - OpenMP 201511 (a.k.a. OpenMP 4.5)\n - LAPACK is enabled (usually provided by MKL)\n - NNPACK is enabled\n - CPU capability usage: AVX2\n - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.7, CUDNN_VERSION=8.5.0, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_DISABLE_GPU_ASSERTS=ON, TORCH_VERSION=2.0.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=1, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, \n', 'TorchVision': '0.15.2+cu117', 'OpenCV': '4.8.1', 'MMCV': '1.7.0', 'MMCV Compiler': 'n/a', 'MMCV CUDA Compiler': 'n/a'}

Reproduces the problem - code sample

略,请参见error message

Reproduces the problem - command or script

略,请参见error message

Reproduces the problem - error message

因为在Windows环境下反复安装失败,经常会报错类似于“can not import Config from xxx”之类的错误,在modelscope开了一个虚拟环境,里面的环境运行项目OK(https://modelscope.cn/models/damo/cv_ir_face-recognition-ood_rts/summary) 然后我将虚拟环境的pip list中关键的包,重新在自己本地linux安装了一遍,但是运行项目依然会报错 mmcv

截图左边为本地虚拟机(Centos),左上为报错(from mmcv import _ext) 截图右边为modelscope环境,from mmcv import _ext无报错。两边mmcv包版本一致

Additional information

No response

zhouzaida commented 11 months ago

请问你是用什么命令安装的 mmcv-full?