Skip to content
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

Issue installing detectron2 on Windows 11 workstation #4948

Closed
pythonlover22 opened this issue May 10, 2023 · 3 comments
Closed

Issue installing detectron2 on Windows 11 workstation #4948

pythonlover22 opened this issue May 10, 2023 · 3 comments

Comments

@pythonlover22
Copy link

pythonlover22 commented May 10, 2023

Hello,
I am currently facing an issue while attempting to install detectron2 on my Windows 11 workstation. I followed the installation instructions carefully and successfully created the environment and installed all the required dependency packages. However, I encountered an error when I executed the command pip install -e detectron2.

To provide you with a comprehensive overview of the situation, I have attached the complete execution code from the Anaconda Prompt (Anconda_Prompt_log.log) under the ##Environment Section below. The attached log file includes the steps starting from the creation of the environment, installation of dependency packages with versions, and the subsequent attempt to install detectron2, which resulted in the encountered error.

  1. Full runnable code or full changes you made:
As this is a fresh installation, I kindly request you to review the attached Anaconda Prompt log file for further details

  1. What exact command you run:
    The error occurred specifically on line number 418 (Attached Anconda_Prompt_log.log) during the execution of the command pip install -e detectron2

  2. Full logs or other relevant observations:

kindly review the attached Anaconda Prompt log file (Anconda_Prompt_log.log).
  1. please simplify the steps as much as possible so they do not require additional resources to
    run, such as a private dataset.
  • Successfully created the environment and installed all the required dependency packages.
  • I encountered an error when I executed the command pip install -e detectron2
    kindly review the attached Anaconda Prompt log file (Anconda_Prompt_log.log) that includes all steps.

Environment:

Anconda_Prompt_log.log

Environment information:

-------------------------------  ----------------------------------------------------------------------------------------------------------------------------------------------
sys.platform                     win32
Python                           3.8.16 | packaged by conda-forge | (default, Feb  1 2023, 15:53:35) [MSC v.1929 64 bit (AMD64)]
numpy                            1.24.3
detectron2                       imported a wrong installation
detectron2._C                    not built correctly: No module named 'detectron2._C'
DETECTRON2_ENV_MODULE            <not set>
PyTorch                          2.0.1 @L:\projects\pythonlover\conda_projects\envs\detectron2gpu\lib\site-packages\torch
PyTorch debug build              False
torch._C._GLIBCXX_USE_CXX11_ABI  False
GPU available                    Yes
GPU 0                            Quadro RTX 5000 (arch=7.5)
Driver version                   522.06
CUDA_HOME                        C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8
Pillow                           9.4.0
torchvision                      0.15.2 @L:\projects\pythonlover\conda_projects\envs\detectron2gpu\lib\site-packages\torchvision
torchvision arch flags           L:\projects\pythonlover\conda_projects\envs\detectron2gpu\lib\site-packages\torchvision\_C.pyd; cannot find cuobjdump
fvcore                           0.1.5.post20221221
iopath                           0.1.9
cv2                              4.7.0
-------------------------------  ----------------------------------------------------------------------------------------------------------------------------------------------
PyTorch built with:
  - C++ Version: 199711
  - MSVC 193431937
  - Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.7.3 (Git Hash 6dbeffbae1f23cbbeae17adb7b5b13f1f37c080e)
  - OpenMP 2019
  - LAPACK is enabled (usually provided by MKL)
  - CPU capability usage: AVX2
  - CUDA Runtime 11.8
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-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;-gencode;arch=compute_37,code=compute_37
  - CuDNN 8.7
  - Magma 2.5.4
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.8, CUDNN_VERSION=8.7.0, CXX_COMPILER=C:/cb/pytorch_1000000000000/work/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj /FS -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_DISABLE_GPU_ASSERTS=OFF, TORCH_VERSION=2.0.1, 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,

I would greatly appreciate any insights or solutions that you or your team may have regarding this problem. Thank you in advance for your assistance and prompt attention to this matter.

@github-actions github-actions bot added the needs-more-info More info is needed to complete the issue label May 10, 2023
@github-actions
Copy link

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template.
The following information is missing: "Instructions To Reproduce the Issue and Full Logs";

@pythonlover22
Copy link
Author

@github_actions: The Instructions To Reproduce the Issue and Full Logs are attched in (Anconda_Prompt_log.log) under the ##Environment Section.

@github-actions github-actions bot removed the needs-more-info More info is needed to complete the issue label May 10, 2023
@pythonlover22
Copy link
Author

Solved. To install Detectron2, it is necessary to install some packages before. Here are the steps to install the required packages:

  1. Install Cython: Cython improves the use of C-based third-party number-crunching libraries like NumPy. Because Cython code compiles to C, it can interact with those libraries directly, and take Python's bottlenecks out of the loop.
    To install Cython, run the following command:
    pip install cython

  2. Install CMake: CMake can be used to configure, build, and package the native extensions for the Python package. The cmake tool helps manage the build process and dependencies, and generates the necessary files for the build system to compile and package the native extensions into a wheel distribution.
    To install CMake, run the following command:
    pip install Cmake

  3. Add CMake to the Windows Environment PATH variables: It is very important to add CMake to the Environment PATH variables. To do this, download the latest release of CMake from https://perso.uclouvain.be/allan.barrea/opencv/building_tools.html and install it according to the instructions provided on the webpage.
    Make sure to select “Add CMake to the system PATH for all users” when prompted. After installation, check your environment variable path to ensure that CMake has been added.

By following these steps, you should be able to install Detectron2 on Windows 11.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant