Skip to content

Installing detectron2 through pants #21210

Answered by jsirois
johnathanchiu asked this question in Q&A
Discussion options

You must be logged in to vote

@johnathanchiu this project has bad packaging has very specific install instructions you didn't follow. It assumes it will only be installed in a venv that already has torch installed.

1st this is how you self-serve debug, stripping Pants and even Pex away:

# Make a fresh venv clean room:
:; python3.12 -mvenv debug.venv
:; debug.venv/bin/pip -q install -U pip
:; debug.venv/bin/pip --version
pip 24.1.2 from /home/jsirois/dev/pex-tool/pip/debug.venv/lib/python3.12/site-packages/pip (python 3.12)

# Now try to install the thing:
:; debug.venv/bin/pip install "detectron2 @ git+https://github.com/facebookresearch/detectron2.git@2a420edb307c9bdf640f036d3b196bed474b8593"
Collecting detectron2@ g…

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
9 replies
@jsirois
Comment options

@johnathanchiu
Comment options

@jsirois
Comment options

@jsirois
Comment options

@jsirois
Comment options

Answer selected by johnathanchiu
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants