facebookresearch / facebookresearch/detectron2

fvcore mismatch and how can i deal with it

Open
#4,611 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
34.7k
Forks
7.9k
PR merge metrics
No merged PRs in 30d

Description

## Instructions To Reproduce the 🐛 Bug:
i download the latest version code and try to install from source code but run into trouble

when i run " python -m pip install -e detectron2-main"
it goes error!

ERROR: Exception:
Traceback (most recent call last):
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
status = self.run(options, args)
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
return func(self, options, args)
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 315, in run
requirement_set = resolver.resolve(
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 75, in resolve
collected = self.factory.collect_root_requirements(root_reqs)
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 471, in collect_root_requirements
req = self._make_requirement_from_install_req(
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 433, in _make_requirement_from_install_req
cand = self._make_candidate_from_link(
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 189, in _make_candidate_from_link
self._editable_candidate_cache[link] = EditableCandidate(
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 321, in __init__
super().__init__(
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
self.dist = self._prepare()
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
dist = self._prepare_distribution()
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 331, in _prepare_distribution
return self._factory.preparer.prepare_editable_requirement(self._ireq)
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 626, in prepare_editable_requirement
req.check_if_exists(self.use_user_site)
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 404, in check_if_exists
existing_dist = get_distribution(self.req.name)
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 439, in get_distribution
dist = get_default_environment().get_distribution(req_name)
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_internal/metadata/pkg_resources.py", line 146, in get_distribution
self._ws.require(name)
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pip._vendor.pkg_resources.ContextualVersionConflict: (fvcore 0.1.5.post20220512 (/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages), Requirement.parse('fvcore<0.1.4,>=0.1.3'), {'detectron2'})

but when i install fvcore 0.1.3 and rerun " python -m pip install -e detectron2-main"
it will be uninstall fvcore 0.1.3 and install a higher version and console alot of error!
## Environment:

(py38_18) [jianming_ge@localhost detectron2-main]$ python collec_env.py
---------------------- -----------------------------------------------------------------------------------------------------------
sys.platform linux
Python 3.8.12 (default, Oct 12 2021, 13:49:34) [GCC 7.5.0]
numpy 1.22.0
detectron2 0.6 @/home/kevin_xie/yifeinfs/jianming_ge/code/city_manage_20221017/detectron2-main/detectron2
detectron2._C not built correctly: No module named 'detectron2._C'
Compiler ($CXX) c++ (GCC) 4.9.0
CUDA compiler Cuda compilation tools, release 10.2, V10.2.89
DETECTRON2_ENV_MODULE
PyTorch 1.8.0 @/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/torch
PyTorch debug build False
GPU available Yes
GPU 0 NVIDIA GeForce RTX 2080 Ti (arch=7.5)
Driver version 465.31
CUDA_HOME /usr/local/cuda-10.2
Pillow 8.3.1
torchvision 0.9.0 @/home/kevin_xie/yifeinfs/jianming_ge/miniconda3/envs/py38_18/lib/python3.8/site-packages/torchvision
torchvision arch flags 3.5, 5.0, 6.0, 7.0, 7.5
fvcore 0.1.5.post20220512
iopath 0.1.9
cv2 4.6.0
---------------------- -----------------------------------------------------------------------------------------------------------
PyTorch built with:
- GCC 7.3
- C++ Version: 201402
- Intel(R) oneAPI Math Kernel Library Version 2021.3-Product Build 20210617 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
- OpenMP 201511 (a.k.a. OpenMP 4.5)
- NNPACK is enabled
- CPU capability usage: AVX2
- CUDA Runtime 10.2
- 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_37,code=compute_37
- CuDNN 7.6.5
- Magma 2.5.2
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=10.2, CUDNN_VERSION=7.6.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -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=1.8.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=ON, USE_NNPACK=ON, USE_OPENMP=ON,

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `python -m pip install -e detectron2-main` in the reported Python 3.8, PyTorch 1.8.0, and CUDA 10.2 environment, then inspect the project's dependency metadata and `collec_env.py` output. Done means editable installation resolves the fvcore requirement without the reported version conflict and the resulting environment no longer reports the installation failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.