<#21210 Installing detectron2 through pants> New d...
# github-notifications
c
#21210 Installing detectron2 through pants New discussion created by johnathanchiu I am trying to install
detectron2
via
pants generate-lockfiles
. I've added the following line to my `requirements.txt`:
Copy code
detectron2 @ git+<https://github.com/facebookresearch/detectron2.git@2a420edb307c9bdf640f036d3b196bed474b8593>
The error I get is
Copy code
17:37:06.86 [INFO] Scheduler initialized.
17:37:07.68 [INFO] Completed: Generate lockfile for setuptools
17:37:08.43 [INFO] Completed: Generate lockfile for mypy
17:37:09.45 [INFO] Completed: Generate lockfile for python-default
17:37:09.45 [ERROR] 1 Exception encountered:

Engine traceback:
  in `generate-lockfiles` goal

ProcessExecutionFailure: Process 'Generate lockfile for python-default' failed with exit code 1.
stdout:

stderr:
pid 77806 -> ~/.cache/pants/named_caches/pex_root/venvs/0deb89b23adbbad7a5b9aac06d2362acf7572cfa/d819101e76d1257235093025e8afc37bee57f317/bin/python -sE ~/.cache/pants/named_caches/pex_root/venvs/0deb89b23adbbad7a5b9aac06d2362acf7572cfa/d819101e76d1257235093025e8afc37bee57f317/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --isolated -q --cache-dir ~/.cache/pants/named_caches/pex_root/pip/24.0/pip_cache --log /private/var/folders/wq/xvgpz9v17qsbhb1vwz087v5w0000gn/T/pants-sandbox-y1SsV5/.tmp/pex-pip-log.vqga2q8u/pip.log download --dest /private/var/folders/wq/xvgpz9v17qsbhb1vwz087v5w0000gn/T/pants-sandbox-y1SsV5/.tmp/tmpbwvn219_/opt.homebrew.Cellar.python@3.12.3.12.4.Frameworks.Python.framework.Versions.3.12.bin.python3.12 Pillow==10.3.0 PyMuPDF==1.23.26 PyPDF2==3.0.1 SQLAlchemy==2.0.23 SQLAlchemy_Utils==0.41.1 absl_py==2.1.0 aiofiles==23.2.1 alembic==1.13.1 anyio==4.3.0 beautifulsoup4==4.12.3 boto3-stubs~=1.34.141 boto3~=1.34.141 botocore~=1.34.95 colorama~=0.4.6 datasets==2.14.6 detectron2@ git+<https://github.com/facebookresearch/detectron2.git@2a420edb307c9bdf640f036d3b196bed474b8593> docker==7.0.0 dspy_ai==2.4.12 fastapi==0.110.0 fire==0.5.0 google_api_python_client==2.134.0 google_auth==2.29.0 google_auth_oauthlib==1.0.0 httpx==0.27.0 instructor==1.3.4 llama-index==0.10.40 matplotlib==3.9.1 ml_collections==0.1.1 msal==1.28.0 networkx==3.3 nltk==3.8.1 numpy==1.26.4 omegaconf==2.3.0 openai==1.23.2 opencv-python==4.10.0.82 outlines==0.0.34 pandas-stubs pandas==2.2.2 pdfminer.six==20221105 pdfplumber==0.10.3 pex==2.2.2 playwright==1.41.2 protobuf==4.25.3 psycopg2_binary==2.9.9 pycocoevalcap==1.2 pydantic==2.7.4 pylibmagic==0.5.0 pypdfium2==4.30.0 pytesseract==0.3.10 pytest==8.2.2 pytest_mock==3.14.0 python-magic==0.4.27 python-multipart==0.0.9 pytorch_lightning==2.1.3 ragas==0.1.9 requests==2.31.0 rich==13.7.1 scikit_learn==1.5.0 setuptools==70.0.0 sqlmodel==0.0.18 starlette~=0.36.3 streamlit==1.35.0 structlog~=24.2.0 tenacity==8.2.3 tensorboard==2.16.2 torch==2.3.0 torchvision==0.18.0 tqdm==4.66.4 transformers==4.41.2 trio==0.24.0 types-Pillow==9.5.0 types-beautifulsoup4==4.12.0.20240511 types-colorama~=0.4.6 types-requests==2.31.0 types-tqdm==4.66.0.5 unstructured-client~=0.22.0 unstructured~=0.14.4 uvicorn==0.28.0 wandb==0.17.4 watchdog~=4.0.0 weaviate_client==4.6.5 websockets~=12.0.0 wheel~=0.43.0 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with 1 and STDERR:
  error: subprocess-exited-with-error
  
  × python setup.py egg_info 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.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.


Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
pantsbuild/pants