mmcv
mmcv copied to clipboard
[Bug] Could not build wheels for mmcv, which is required to install pyproject.toml-based projects
Prerequisite
- [X] I have searched Issues and Discussions but cannot get the expected help.
- [X] The bug has not been fixed in the latest version(https://github.com/open-mmlab/mmcv).
Environment
Please see https://github.com/open-mmlab/mmdetection/issues/10873
Reproduces the problem - code sample
Please see https://github.com/open-mmlab/mmdetection/issues/10873 for details.
Reproduces the problem - command or script
Please see https://github.com/open-mmlab/mmdetection/issues/10873 for details.
Reproduces the problem - error message
Traceback (most recent call last):
File "
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mmcv Running setup.py clean for mmcv Failed to build mmcv ERROR: Could not build wheels for mmcv, which is required to install pyproject.toml-based projects
Additional information
No response
Hi @rbli-john , could you try to install wheel first?
@zhouzaida You mean pip install wheel
?
@zhouzaida You mean
pip install wheel
?
yes
i am also facing the same issue. tried installing wheel first but it was already installed so it did not help.
I also have the same error
This issue may be caused by that the version of pytorch you have is 2.1.0. We will release a pre-compiled mmcv package that supports pytorch 2.1.0 in about a week, until then you can try to solve the problem by lowering your pytorch version to 2.0 or by compiling mmcv from source.
Help documentation for compiling mmcv from source: https://mmcv.readthedocs.io/en/latest/get_started/build.html
I am also facing the same issue, not able to build from source also and I am using torch version-1.11.0, even then I am facing this issue. This is my nvcc version: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 how to solve this problem.
Can you provide more information? Such as the command or script did you run and the error traceback?
I am also facing the same issue, not able to build from source also and I am using torch version-1.11.0, even then I am facing this issue. This is my nvcc version: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 how to solve this problem.
Can you provide more information? Such as the command or script did you run and the error traceback?
I am facing the same issue. The command is, as follows:
pip install -U openmim mim install mmengine mim install 'mmcv>=2.0.0rc1'
Also enclosed please kindly find the error message:
I am also facing the same issue, not able to build from source also and I am using torch version-1.11.0, even then I am facing this issue. This is my nvcc version: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 how to solve this problem.
Can you provide more information? Such as the command or script did you run and the error traceback?
I am facing the same issue. The command is, as follows:
pip install -U openmim mim install mmengine mim install 'mmcv>=2.0.0rc1'
Also enclosed please kindly find the error message:
Sorry, I cannot reproduce the error. But you can check the version of gcc.
I encountered this problem too. And I solved it by pip installation regardless of mim. You can refer to their official documentation: customize-installation
I am also facing the same issue, not able to build from source also and I am using torch version-1.11.0, even then I am facing this issue. This is my nvcc version: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 how to solve this problem.
You can try to install mmcv from source. https://mmcv.readthedocs.io/en/latest/get_started/build.html#build-mmcv
I am also facing the same issue, not able to build from source also and I am using torch version-1.11.0, even then I am facing this issue. This is my nvcc version: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 how to solve this problem.
You can try to install mmcv from source. https://mmcv.readthedocs.io/en/latest/get_started/build.html#build-mmcv
I have install mmcv from source, and it does show success. However, when I import mmcv, it throws an error.
Why does this happen? I desperately want to know how I can solve this problem. Thanks!
I am also facing the same issue, what's happening?
[
I need help, please!
Same issue here. When will release a pre-compiled mmcv package that supports pytorch 2.1.0 ? Thanks!
I am also facing the same issue, what's happening? [
![]()
I need help, please!
I have solved the problem by lowering the pytorch version. thanks
This is a version incompatibility issue and you may need to replace your pytorch version
我也面临同样的问题,请问这是怎么回事?[
![]()
我需要帮助,拜托!
我已经通过降低pytorch版本解决了这个问题。谢谢
请问你是降级到哪个pytorch版本解决这个问题的呢
This helped conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
I have built successfully with CUDA 12.2 and PyTourch 2.1.0+cu121
https://mmcv.readthedocs.io/en/latest/get_started/build.html
pip3 install -r requirements/optional.txt
pip3 install -e . -v
Validate the installation python3 .dev_scripts/check_installation.py
sys.platform: win32 Python: 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] CUDA available: True numpy_random_seed: 2147483648 GPU 0: NVIDIA RTX A6000 CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2 NVCC: Cuda compilation tools, release 12.2, V12.2.140 MSVC: Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64 GCC: n/a PyTorch: 2.1.0+cu121 PyTorch compiling details: PyTorch built with:
- C++ Version: 199711
- MSVC 192930151
- Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v3.1.1 (Git Hash 64f6bcbcbab628e96f33a62c3e975f8535a7bde4)
- OpenMP 2019
- LAPACK is enabled (usually provided by MKL)
- CPU capability usage: AVX512
- CUDA Runtime 12.1
- NVCC architecture flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90
- CuDNN 8.8.1 (built against CUDA 12.0)
- Magma 2.5.4
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=8.8.1, CXX_COMPILER=C:/actions-runner/_work/pytorch/pytorch/builder/windows/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /bigobj /FS -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE /utf-8 /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_DISABLE_GPU_ASSERTS=OFF, TORCH_VERSION=2.1.0, 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=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF,
TorchVision: 0.16.0+cu121 OpenCV: 4.8.1 MMEngine: 0.7.3 MMCV: 2.1.0 MMCV Compiler: MSVC 193732825 MMCV CUDA Compiler: 12.2
This issue may be caused by that the version of pytorch you have is 2.1.0. We will release a pre-compiled mmcv package that supports pytorch 2.1.0 in about a week, until then you can try to solve the problem by lowering your pytorch version to 2.0 or by compiling mmcv from source.
Help documentation for compiling mmcv from source: https://mmcv.readthedocs.io/en/latest/get_started/build.html
This work for me
I attempted to reinstall wheel with pip install wheel
, but the error persisted. I then try lowering my Python version to 2.0.0, and it works.
pip install torch==2.0.0 torchvision==0.15.1
Note that I am using mmdetection on Google Colab
I have the same problem. I'm trying to run mit/bevfusion, but when configuring the environment I use pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.1/index.html build wheel failed. My environment configuration is as follows: CUDA 11.3 Pytorch 1.10.1 gcc/g++ 7 Has anyone encountered the same problem and solved it? urgent need.
I have the same problem. I'm trying to run mit/bevfusion, but when configuring the environment I use pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.1/index.html build wheel failed. My environment configuration is as follows: CUDA 11.3 Pytorch 1.10.1 gcc/g++ 7 Has anyone encountered the same problem and solved it? urgent need.
It's because we do not provide the pre-complied MMCV package with torch1.10.1 and CUDA 11.3. You can try pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html
I have the same problem. I'm trying to run mit/bevfusion, but when configuring the environment I use pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.1/index.html build wheel failed. My environment configuration is as follows: CUDA 11.3 Pytorch 1.10.1 gcc/g++ 7 Has anyone encountered the same problem and solved it? urgent need.
It's because we do not provide the pre-complied MMCV package with torch1.10.1 and CUDA 11.3. You can try
pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html
Thank you for your reply. After waiting for a long time, it built successfully.
This issue may be caused by that the version of pytorch you have is 2.1.0. We will release a pre-compiled mmcv package that supports pytorch 2.1.0 in about a week, until then you can try to solve the problem by lowering your pytorch version to 2.0 or by compiling mmcv from source. Help documentation for compiling mmcv from source: https://mmcv.readthedocs.io/en/latest/get_started/build.html
This work for me
I attempted to reinstall wheel with
pip install wheel
, but the error persisted. I then try lowering my Python version to 2.0.0, and it works.pip install torch==2.0.0 torchvision==0.15.1
Note that I am using mmdetection on Google Colab
He means lowering the Pytorch. The word made me confused at first glance 😅
Same issue with [email protected] and [email protected]. I solved this problem several weeks ago, but now just forget what i did
Can anyone please help me here?
for me, wheel could not build wheels for lm-eval, which is required to install pyproject.toml-based projects
I have the same problem. I'm trying to run mit/bevfusion, but when configuring the environment I use pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.1/index.html build wheel failed. My environment configuration is as follows: CUDA 11.3 Pytorch 1.10.1 gcc/g++ 7 Has anyone encountered the same problem and solved it? urgent need.
It's because we do not provide the pre-complied MMCV package with torch1.10.1 and CUDA 11.3. You can try
pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html
Thanks, that really helpful, its work finally.
I have the same problem. I'm trying to run mit/bevfusion, but when configuring the environment I use pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.1/index.html build wheel failed. My environment configuration is as follows: CUDA 11.3 Pytorch 1.10.1 gcc/g++ 7 Has anyone encountered the same problem and solved it? urgent need.
It's because we do not provide the pre-complied MMCV package with torch1.10.1 and CUDA 11.3. You can try
pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html
I have the same issue with insightface package, how can I solve it?
check.warn(importable)
#0 598.1 creating build/lib.linux-x86_64-cpython-39/insightface/data/images
#0 598.1 copying insightface/data/images/Tom_Hanks_54745.png -> build/lib.linux-x86_64-cpython-39/insightface/data/images
#0 598.1 copying insightface/data/images/mask_black.jpg -> build/lib.linux-x86_64-cpython-39/insightface/data/images
#0 598.1 copying insightface/data/images/mask_blue.jpg -> build/lib.linux-x86_64-cpython-39/insightface/data/images
#0 598.1 copying insightface/data/images/mask_green.jpg -> build/lib.linux-x86_64-cpython-39/insightface/data/images
#0 598.1 copying insightface/data/images/mask_white.jpg -> build/lib.linux-x86_64-cpython-39/insightface/data/images
#0 598.1 copying insightface/data/images/t1.jpg -> build/lib.linux-x86_64-cpython-39/insightface/data/images
#0 598.1 creating build/lib.linux-x86_64-cpython-39/insightface/data/objects
#0 598.1 copying insightface/data/objects/meanshape_68.pkl -> build/lib.linux-x86_64-cpython-39/insightface/data/objects
#0 598.1 creating build/lib.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh/cython
#0 598.1 copying insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp -> build/lib.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh/cython
#0 598.1 copying insightface/thirdparty/face3d/mesh/cython/mesh_core.h -> build/lib.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh/cython
#0 598.1 copying insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.c -> build/lib.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh/cython
#0 598.1 copying insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpp -> build/lib.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh/cython
#0 598.1 copying insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.pyx -> build/lib.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh/cython
#0 598.1 copying insightface/thirdparty/face3d/mesh/cython/setup.py -> build/lib.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh/cython
#0 598.1 running build_ext
#0 598.1 building 'insightface.thirdparty.face3d.mesh.cython.mesh_core_cython' extension
#0 598.1 creating build/temp.linux-x86_64-cpython-39
#0 598.1 creating build/temp.linux-x86_64-cpython-39/insightface
#0 598.1 creating build/temp.linux-x86_64-cpython-39/insightface/thirdparty
#0 598.1 creating build/temp.linux-x86_64-cpython-39/insightface/thirdparty/face3d
#0 598.1 creating build/temp.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh
#0 598.1 creating build/temp.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh/cython
#0 598.1 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iinsightface/thirdparty/face3d/mesh/cython -I/tmp/pip-build-env-inxjfxz8/overlay/lib/python3.9/site-packages/numpy/core/include -I/var/lang/include/python3.9 -c insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp -o build/temp.linux-x86_64-cpython-39/insightface/thirdparty/face3d/mesh/cython/mesh_core.o
#0 598.1 error: command 'gcc' failed: No such file or directory
#0 598.1 [end of output]
#0 598.1
#0 598.1 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 598.1 ERROR: Failed building wheel for insightface
#0 598.1 Failed to build insightface
#0 598.1 ERROR: Could not build wheels for insightface, which is required to install pyproject.toml-based projects
#0 598.1
#0 598.1 [notice] A new release of pip is available: 23.0.1 -> 23.3.2
#0 598.1 [notice] To update, run: pip install --upgrade pip
ERROR: failed to solve: executor failed running [/bin/sh -c python3.9 -m pip install -r requirements.txt -t .]: exit code: 1
Hi @galaltche , what is your pytorch and cuda version? BTW, what is your command to install mmcv-full?
Hi @galaltche , what is your pytorch and cuda version? BTW, what is your command to install mmcv-full?
torch==2.1.2 and Cuda 9.1
Hi @galaltche , what is your pytorch and cuda version? BTW, what is your command to install mmcv-full?
torch==2.1.2 and Cuda 9.1
Hi, torch2.1.2 should not provide the pre-built packages for cuda 9.1 so we also do not support it. Could you use cuda11.8 or cuda12.1?