facebookresearch / facebookresearch/detectron2
install detectron2 meets some problems
- Dominant language
- Python
- Stars
- 34.7k
- Forks
- 7.9k
- PR merge metrics
- No merged PRs in 30d
Description
## Instructions To Reproduce the 🐛 Bug:
1.
```
--> python -m pip install -e detectron2
Looking in indexes: http://mirrors.aliyun.com/pypi/simple
Obtaining file:///root/rcbevdet/detectron2
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... error
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
Traceback (most recent call last):
File "/root/rcbevdet/myenv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in
main()
File "/root/rcbevdet/myenv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
File "/root/rcbevdet/myenv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 157, in get_requires_for_build_editable
return hook(config_settings)
File "/tmp/pip-build-env-8zw8gi3a/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 482, in get_requires_for_build_editable
return self.get_requires_for_build_wheel(config_settings)
File "/tmp/pip-build-env-8zw8gi3a/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "/tmp/pip-build-env-8zw8gi3a/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 303, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-8zw8gi3a/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 521, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-8zw8gi3a/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 319, in run_setup
exec(code, locals())
File "", line 10, in
ModuleNotFoundError: No module named 'torch'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
```
2. What exact command you run: python -m pip install -e detectron2
I don't konw why this problem appears and I use many methods to solve this problem but they do not work.
Contributor guide
Research direction
Reproduce the failure with `python -m pip install -e detectron2` and inspect the editable-install build step that invokes setuptools and raises `ModuleNotFoundError: No module named 'torch'`. Determine how the build environment is expected to obtain torch, then verify that the editable installation completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100