Open rbli-john opened 1 year ago
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:
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
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 pytorch@1.12 and pytorch@1.13. 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)
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?
Same prob here. I have tried to install MMYOLO twice and both got error when it comes to mim install -v -e .
and both lower PyTorch version and compile MMCV methods did not work out.
Solution:
i recommend @chenscottus 's way which is replace mim install -v -e .
to pip3 install -e . -v
and this works to me.
by the way, in my second try i have facing the problem when i use mim install "mmcv>=2.0.0rc4,<2.1.0"
it returns : can't find module Torch, i replaced it to mim install mmcv
with no error. But MMCV installed version is 2.1.0 so it needs to modify the source code in mmyolo/mmyolo/__init__.py
:
assert (mmcv_version >= digit_version(mmcv_minimum_version)
and mmcv_version <= digit_version(mmcv_maximum_version)), \
f'MMCV=={mmcv.__version__} is used but incompatible. ' \
f'Please install mmcv>={mmcv_minimum_version}, <{mmcv_maximum_version}.'
# add '=' after '<'
here is my workout enviroment: torch 2.1.2 mmcv 2.1.0 cuda 12.1 mmyolo 0.6.0
Except all solution above, please check your gcc. I have resolved by fix gcc env~~ It is linked to my Xcode config, very strange (xcode-select -switch)
I also met this issue, my torch is 2.2.0 then I lower it to 2.1.0, issue still exists. So the solution is to lower it to 2.0.0?
Same issue here. When will release a pre-compiled mmcv package that supports pytorch 2.1.0 ? Thanks!
Installation guide for cuda 12.1 + torch 2.1.x is here: https://mmcv.readthedocs.io/en/latest/get_started/installation.html#install-with-pip
Same issue here. When will release a pre-compiled mmcv package that supports pytorch 2.1.0 ? Thanks!
Installation guide for cuda 12.1 + torch 2.1.x is here: https://mmcv.readthedocs.io/en/latest/get_started/installation.html#install-with-pip
Hi! @senjacob this link has helped me to build mmcv successfully that supports pytorch 2.1.x. Thanks!
The same problem was solved by changing the pytorch version: python == 3.10 torch ==2.0.0+cu117 mmcv==2.2.0 (cuda11.7) It finally worked. PS: My previous version: python==3.12.3 torch==2.3.0 mmcv==2.2.0 cuda12.1
The same problem was solved by changing the pytorch version: python == 3.10 torch ==2.0.0+cu117 mmcv==2.2.0 (cuda11.7) It finally worked. PS: My previous version: python==3.12.3 torch==2.3.0 mmcv==2.2.0 cuda12.1
Do not understand why can not BUILD MMCV FROM SOURCE, I used the Install with pip.
I also had same error message as this issue title.
Followed instructions on https://mmdetection.readthedocs.io/en/latest/get_started.html
Broke at mim install mmdet
.
Same instructions fail on colab too.
Fixed with pip install mmdet
However running the inference demo
from mmdet.apis import init_detector, inference_detector
config_file = 'rtmdet_tiny_8xb32-300e_coco.py'
checkpoint_file = 'rtmdet_tiny_8xb32-300e_coco_20220902_112414-78e30dcc.pth'
model = init_detector(config_file, checkpoint_file, device='cpu') # or device='cuda:0'
inference_detector(model, 'demo/demo.jpg')
on the same link broke with AssertionError: MMCV==2.2.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.2.0
pip install 'mmcv==2.0.0rc4'
fails with same error as issue title.
Python 3.10.14
torch: 2.3.0+cu118
nvcc --version: cuda_11.8.r11.8/compiler.31833905_0
Downgrading torch to 2.0.0 worked.
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118
mim install mmdet
worked too.
Demo worked too
You can go to this website, select your operating system and cuda version and torch version and the mmcv version you want to install, and install mmcv using the command generated by it. https://mmcv.readthedocs.io/en/latest/get_started/installation.html#install-mmcv
@lurongkang123 Is there any place documenting compatibilities between mmcv and other application specific modules like mmdet, mmsegmentation etc?
I tried using the selector at https://mmcv.readthedocs.io/en/latest/get_started/installation.html, even though it installs mmcv properly, mmdet is not installable with pytorch 2.3
@hanqi-monarch
@lurongkang123 Is there any place documenting compatibilities between mmcv and other application specific modules like mmdet, mmsegmentation etc?
I tried using the selector at https://mmcv.readthedocs.io/en/latest/get_started/installation.html, even though it installs mmcv properly, mmdet is not installable with pytorch 2.3
Sorry, I am just a beginner, do not understand this part of the content, may not be able to provide you with any help, I wish you an early solution to the problem
This helped
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
This works
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.该问题可能是由于您的pytorch版本是2.1.0导致的。我们将在大约一周内发布支持 pytorch 2.1.0 的预编译 mmcv 包,在此之前您可以尝试通过将 pytorch 版本降低到 2.0 或从源代码编译 mmcv 来解决问题。 Help documentation for compiling mmcv from source: https://mmcv.readthedocs.io/en/latest/get_started/build.html从源代码编译mmcv的帮助文档: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 wheel
重新安装wheel,但错误仍然存在。然后我尝试将 Python 版本降低到 2.0.0,结果成功了。pip install torch==2.0.0 torchvision==0.15.1
Note that I am using mmdetection on Google Colab请注意,我在 Google Colab 上使用 mmdetection
It really works! Thanks a lot! 🌹
CUDA 11.8
conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia
mmcv: 2.0.1
mmdet: 3.0.0
Hi @chenscottus ,
Thanks for your comment here for cuda12.1. I am wondering if the version you installed here is mmcv-full or not as I follow it but it turns out
ModuleNotFoundError: No module named 'mmcv._ext'
,
ImportError: cannot import name 'MultiScaleDeformableAttention' from 'mmcv.cnn.bricks.transformer'
in my code which indicates that the mmcv is not full version...
我解决上述问题的方式是直接下载对应cuda,pytorch版本的mmcv,比如我的环境是cuda 10.2,pytorch 1.12.0,直接在下面链接找对应版本的mmcv的whl文件下载https://download.openmmlab.com/mmcv/dist/cu102/torch1.12/index.html 例如https://download.openmmlab.com/mmcv/dist/cu102/torch1.12.0/mmcv-2.0.0-cp39-cp39-manylinux1_x86_64.whl 然后直接 pip install mmcv-2.1.0-cp39-cp39-manylinux1_x86_64.whl
My impression is that the problem with wheels occurs first after some of the recommended installation steps. For mmocr I follow https://mmocr.readthedocs.io/en/dev-1.x/get_started/install.html and tried several times with some variations on Windows. The last time I tested that mmcv in the required version would install before installing everything else, which it did, but then I tried to reinstall and I get this wheel error again. The reason for another attempt to install was "No module named 'mmcv._ext'" as above and I thought it might be installation order.
Prerequisite
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 "", line 2, in
File "", line 34, in
File "/private/var/folders/dv/wbjrnyb94pv5djk1y4dkb_bc0000gp/T/pip-install-dqtzkf49/mmcv_6a35770b2d544b4d877baaec1726bc41/setup.py", line 437, in
setup(
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/init.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 325, in run
self.run_command("build")
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 848, in build_extensions
build_ext.build_extensions(self)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 663, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1578, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/Users/rongbin/anaconda3/envs/openmmlab/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1921, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]
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