open-mmlab / mmcv

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

[Bug] Windows packages on pypi.org do not contain _ext module #3080

Open ruckc opened 2 months ago

ruckc commented 2 months ago

Prerequisite

Environment

OrderedDict([('sys.platform', 'win32'), ('Python', '3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]'), ('CUDA available', False), ('MUSA available', False), ('numpy_random_seed', 2147483648), ('MSVC', 'Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64'), ('GCC', 'n/a'), ('PyTorch', '2.2.2+cpu'), ('PyTorch compiling details', 'PyTorch built with:\n - C++ Version: 201703\n - MSVC 192930151\n - Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v3.3.2 (Git Hash 2dc95a2ad0841e29db8b22fbccaf3e5da7992b01)\n - OpenMP 2019\n - LAPACK is enabled (usually provided by MKL)\n - CPU capability usage: AVX2\n - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CXX_COMPILER=C:/actions-runner/_work/pytorch/pytorch/builder/windows/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /Zc:__cplusplus /bigobj /FS /utf-8 -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE /wd4624 /wd4068 /wd4067 /wd4267 /wd4661 /wd4717 /wd4244 /wd4804 /wd4273, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.2.2, USE_CUDA=0, USE_CUDNN=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF, \n'), ('OpenCV', '4.9.0'), ('MMEngine', '0.10.3'), ('MMCV', '2.1.0'), ('MMCV Compiler', 'MSVC 193933523'), ('MMCV CUDA Compiler', 'not available')])

Reproduces the problem - code sample

import mmcv._ext

Reproduces the problem - command or script

pip install mmcv

Reproduces the problem - error message

ModuleNotFoundError: No module named 'mmcv._ext'

Additional information

  1. Expected result, leverage mmdetections on windows for inference
  2. Ideally leverage existing pypi packages
  3. Can't because mmcv doesn't provide the _ext module.
zhouzaida commented 2 months ago

Hi, you can install the correct pacages with the following command:

pip install openmim
mim install mmcv
ruckc commented 2 months ago

mim isn't a mechanism my organization allows.

pip is the python standard.

zhouzaida commented 2 months ago

please refer to https://mmcv.readthedocs.io/en/latest/get_started/installation.html#install-with-pip

Astulx commented 2 months ago

Hi, you can install the correct pacages with the following command:

pip install openmim
mim install mmcv

I also have this problem, and this solution is not feasible, both mim and pip re-install the problem still exists

Remember2015 commented 1 month ago

same problem