-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation takes forever #1386
Comments
hi @FrancescoSaverioZuppichini . It seems like that mmcv is being compiled, but this is not actually the expected behavior. The expected behavior of this command should be to install pre-compiled packages. Here are the pre-compiled packages provided with mmcv.
|
Hi @zhouzaida thank you for your reply. Running
Following the above table doesn't prevent the building process |
Please provide your Python version, PyTorch version, and CUDA version? |
I observe the same problem locally and in the demo on colab. It gets stuck on:
|
hi, Could you provide the full log here? |
What is your python version? If it is 3.9, I am sorry to say that we have not provided a pre-built package for python3.9 so mmcv-full will be compiled when installing it. Usually, it will take 10 minutes, if it takes too long, then there should be a problem somewhere. |
Thanks for your feedback, I will check it. |
Hi @zhouzaida yeah it is python 3.9, mystery solved :) sys.platform: linux
TorchVision: 0.9.1+cu102 |
We have not provided a pre-built package for python3.9 and you can build it from source. Please refer to https://mmcv.readthedocs.io/en/latest/get_started/build.html |
Thank you! |
In the latest version (v1.3.15), we provide pre-compiled packages for the Python 3.9 environment. |
Hi team, please help, we are facing the same issue. It is taking forever and still the installation is not complete. Waited more than 4 hours. The MMCV installation that we are using is: Our Cuda version is 10.2.300 and the Torch version is 1.10.0 Tried restart and also flashed new SD card thinking - just in case - but to no avail. Please help! update: my one also process is stuck at Building wheel for mmcv-full (setup.py) ... | As you can see from the above link, I went for a pre-compiled version but it still seems to be building the wheel |
Hi, thanks for your report. Could you provide the compilation log? |
Hi @zhouzaida, herewith i have included the log: (mmdeploy) nano4g@nano4g-desktop: It gets stuck at "Running setup.py.........." |
It seems like the program was compiling the mmcv-full which is not an expected behavior. What is your python version? |
It is Python 3.6. We are using 3.6 because pre-compiled Torch (1.10.0) and Torchvision (0.11.1) versions for Nvidia Jetson are working nicely with python3.6 only. The v3.7 is not playing nicely with the torch. Setup base don this: https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-10-now-available/72048 P.s: Above setup link is also advised in the Jetson setup article in MMDeploy tutorial: https://github.com/open-mmlab/mmdeploy/blob/master/docs/en/tutorials/how_to_install_mmdeploy_on_jetsons.md |
Hi, you should build mmcv-full from source with the command |
Hi @zhouzaida thanks. so does that mean that the pre-compiled versions are not suitable for jetson series? |
yet |
@zhouzaida thanks for clarifying. i will give source build a go. |
hi @zhouzaida - with source install I am getting following error: |
After I replaced pip with pip3, somehow it did continue the process but then after a while it threw following error: (mmdeploy) nano4g@nano4g-desktop:
Command "/usr/bin/python3 -c "import setuptools, tokenize;file='/home/nano4g/mmcv/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" develop --no-deps --user --prefix=" failed with error code 1 in /home/nano4g/mmcv/ |
It seems like the memory is not enough. |
@zhouzaida - I added swap memory too. Today I did a fresh install, everything is now moving smoothly but getting stuck at MMCV install. It is giving the same error for both compiled version and install from source. I feel like i am almost there...could you please help me with understanding the following error. Solving this should get me through......... (mmdeploy) nano4g@nano4g-desktop:
ERROR: Command errored out with exit status 1: /home/nano4g/.conda/envs/mmdeploy/bin/python3.6 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/nano4g/mmcv/setup.py'"'"'; file='"'"'/home/nano4g/mmcv/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output. |
Please @grimoire have a look. |
Hi I got similar issue as yours on Jetson nano. Did you managed to install mmcv on Jetson nano?? |
you need to downgrade to pytorch 1.13, pytorch 2.0 has been released, but many libraries don't support it yet, hence source build is triggered by mmlab packages (instead of installing binaries). |
This IS the code that fails.
I'll try that next time ! Thank you ! |
That worked for me! Windows |
It doesn't seem to fix the issue on Colab. Pytorch & depencies downgrading takes times, and then still "Building wheels for collected packages: mmcv-full" still takes forever to finnish, runtime was deleted before it ends. |
@jarredou This installation worked in colab fo me. Have you tried? #1386 (comment) |
Which version did you use? There is nothing on that table for the CUDA versions that are used in colab. |
Python 3.8 works for me |
I used this intstallation: !pip install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html |
I've tried several times to get this installed. For this latest attempt I decided to download the most recent image 3.10. I forgot that I had fairly good luck earlier changing mmcv-full==1.7.0 to mmcv-full=1.7.1. I may even have tried 1.13.0. Normally I run out of memory. I'm on a 64GB Chromebook. Here's my latest error message:
To recover space this next time, I'm going to try some commands that I'm only now learning about: https://docs.docker.com/desktop/faqs/linuxfaqs/#why-does-docker-desktop-for-linux-run-a-vm
|
I tried following the instruction here and worked
|
thank you so much! I am using google Colab with cuda118, your "mmcv==2.0.0" solve my question. |
Honestly the 2.0 mmcv removed a bunch of core packages, and could introduce more problems than you need... I just decided to live with the super long pip install doing a custom build, but at least with awareness that the build is working correctly, e.g. via
(1.5.0 is what I needed to install https://github.com/facebookresearch/dinov2/tree/main but your ideal version may vary) |
(and in the time it took me to write the above comment, the build finished) |
Python3 version==3.11.5 , PyTorch version==2.1.1+cu121 and CUDA version==12.3 please help me fixe for this errors |
pip install mmcv==1.7.1 - Worked for me as well. A year later and this is still an issue? It would be nice if the following worked. |
My problem was that my torch version was 2.2, and mmcv doesn't have prebuilt wheels for it, only 2.1, 2.0. And so it tried to build package from source, and failed very badly |
I'm facing the same issue on Colab, can some one guide how to solve it for Colab? I left it running for over an hour but it was still stuck at: |
did you make any changes to run it for Colab? mine is still stuck at it. #1386 (comment) |
Solution is just above 😉 with #1386 (comment) @haleemasadiakhan
Worked pretty well today on my Google Colab Pro session running A100 GPU
|
Do anyone have any solution to recompile mmcv when built from source if not have enough ram + swap. In my case, when built mmcv from source take 24Gb Ram. I have to extend swap to install it. Here is my enviroment take by mmcv.utuls,env.collect_env OrderedDict([('sys.platform', 'linux'), ('Python', '3.8.13 (default, Oct 21 2022, 23:50:54) [GCC 11.2.0]'), ('CUDA available', True), ('MUSA available', False), ('numpy_random_seed', 2147483648), ('GPU 0', 'NVIDIA GeForce GTX 1050 Ti'), ('CUDA_HOME', '/usr/local/cuda'), ('NVCC', 'Cuda compilation tools, release 12.3, V12.3.52'), ('GCC', 'gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0'), ('PyTorch', '2.2.2+cu121'), ('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 v3.3.2 (Git Hash 2dc95a2ad0841e29db8b22fbccaf3e5da7992b01)\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 - CUDA Runtime 12.1\n - NVCC architecture flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-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\n - CuDNN 8.9.2\n - Magma 2.6.1\n - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=8.9.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -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 -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.2.2, 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, USE_ROCM_KERNEL_ASSERT=OFF, \n'), ('TorchVision', '0.17.2+cu121'), ('OpenCV', '4.9.0'), ('MMEngine', '0.10.3'), ('MMCV', '2.1.0'), ('MMCV Compiler', 'GCC 11.4'), ('MMCV CUDA Compiler', '12.3')]) |
For those that want to run the BasicVSR++ demo, this will not work because the demo requires a mmcv version greater than or equal to 1.3.13 but less than or equal to 1.6.0. |
I am experiencing the same issue. These are the dependencies and versions I need:
Using How can I prevent the hanging with installing |
In my case,
Solved my problem. You should check compatible
|
I had similar problem with mmcv-full could not build wheel. bla bla bla. So when I had installed mmcv( not full), then mmcv-full returned error. I reinstalled windows and installed first mmcv_full-1.7.2 and everything started to work. After few tests later i installed normal mmcv 2.2.0, cos it was still needed. |
I had the same problem. I managed to install mmcv two ways: 1 - pip install mmcv==2.2.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.3/index.html Unfortunatelly when runing the demo: It shows AssertionError: MMCV==2.2.0 is used but incompatible. Please install mmcv>=2.0.0rc4. Then again, if I try to install the version 2.0.0rc4, with pip or mim, it takes forever the wheel building. Runing on Windows 11, my cuda is 12.4 and my pytorch 2.4.0. I am guessing that my problems are related to these versions of cuda and pytorch. Is there a solution for this? |
Hi guys,
I am running
On a quite powerful 8 core machine and the installation takes forever, more than 30m. The process is stuck at
Building wheel for mmcv-full (setup.py) ... |
I am wondering if this is okay.
Thank you :)
Francesco
The text was updated successfully, but these errors were encountered: