-
Notifications
You must be signed in to change notification settings - Fork 15
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
ImportError: Cannot import 'detrex._C', therefore 'MultiScaleDeformableAttention' is not available. detrex is not compiled successfully, please build following the instructions! #23
Comments
You need to rebuild the detrex package. You can refer to the following code: # Suppose you have set root_dir env_var and have installed the requirements on ovdino conda env.
cd $root_dir/ovdino
conda activate ovdino
python -m pip install -e detectron2-717ab9
pip install -e ./ If the above processing failed, you may need to recreate a new env following the installation guideline. |
@SummerLam I need more info to debug your issue, please give me more error information. |
It looks like that the gcc version is too slow, you could type the following command: which gcc; gcc --version Try to install gcc by conda: conda install gcc=9 gxx=9 -c conda-forge -y # Optional: install gcc9 Then recompile the detecton2 and detrex package. |
The error is your cuda not install correctly, you can get help from the issue. |
ok, thank you so much for the information provided and your help. i will read that through. |
|
The figure shows that your installed cuda version is 12.1, while your torch cuda version is 11.6, the two cudas are not match well. You need to install cuda 11.6 manually or install higher version pytorch with cuda12.1(not recommend, may introduce more issue). |
I see, thank you so much for your kind assistance. |
Do you have compiled detectron2 and detrex successfully? The error info shows that your detrex is not build successfully, as the deformable_conv operator is not installed. |
1 similar comment
The content of the error is shown like this : |
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())" |
the issue has been fixed, after specifying the cuda path to be cuda-11.6, we have to run the command pip install -e ./ again and then it can work |
Thank you for your help and attention |
I didn't use conda.
I didn't use conda. I'm in the docker container with cuda2.1 and torch12.1. I'll try to use conda and strictly follow the README and try again. |
when i tried to run the sh scripts/demo.sh process, i got this error of failing to import detrex._C and i followed the instruction online of how to fix this issue which is by setting the cuda_home path, tho my cuda_home is not none, i ran the command (export CUDA_HOME=/usr/local/cuda) anyway. However, it didnt resolve the issue. therefore, i would like to seek help here to see what else can be done to fix the error.
The text was updated successfully, but these errors were encountered: