Can't install detectron2
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: Arch Linux
- Poetry version: 1.0.5
- Contents of your pyproject.toml file:
[tool.poetry]
name = "a"
version = "0.1.0"
description = ""
authors = ["a"]
[tool.poetry.dependencies]
python = "^3.6"
detectron2 = { git = "https://github.com/facebookresearch/detectron2.git" }
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
Issue
Poetry can’t figure out the version of detectron2. I’ve tried to debug this myself but the error messages don’t tell me anything useful:
$ /tmp/poetry/bin/poetry install -vvv
Creating virtualenv a-1_qs6r2x-py3.8 in /home/x/.cache/pypoetry/virtualenvs
Using virtualenv: /home/x/.cache/pypoetry/virtualenvs/a-1_qs6r2x-py3.8
Updating dependencies
Resolving dependencies...
1: fact: a is 0.1.0
1: derived: a
1: fact: a depends on detectron2 (*)
1: selecting a (0.1.0)
1: derived: detectron2 (*)
1: Version solving took 3.842 seconds.
1: Tried 1 solutions.
[RuntimeError]
Unable to retrieve the package version for /tmp/pypoetry-git-detectron2683igqav
Traceback (most recent call last):
File "/tmp/poetry/lib/poetry/_vendor/py3.8/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/tmp/poetry/lib/poetry/_vendor/py3.8/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/tmp/poetry/lib/poetry/_vendor/py3.8/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/tmp/poetry/lib/poetry/_vendor/py3.8/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/tmp/poetry/lib/poetry/console/commands/install.py", line 63, in handle
return_code = installer.run()
File "/tmp/poetry/lib/poetry/installation/installer.py", line 74, in run
self._do_install(local_repo)
File "/tmp/poetry/lib/poetry/installation/installer.py", line 161, in _do_install
ops = solver.solve(use_latest=self._whitelist)
File "/tmp/poetry/lib/poetry/puzzle/solver.py", line 36, in solve
packages, depths = self._solve(use_latest=use_latest)
File "/tmp/poetry/lib/poetry/puzzle/solver.py", line 180, in _solve
result = resolve_version(
File "/tmp/poetry/lib/poetry/mixology/__init__.py", line 7, in resolve_version
return solver.solve()
File "/tmp/poetry/lib/poetry/mixology/version_solver.py", line 80, in solve
next = self._choose_package_version()
File "/tmp/poetry/lib/poetry/mixology/version_solver.py", line 355, in _choose_package_version
packages = self._provider.search_for(dependency)
File "/tmp/poetry/lib/poetry/puzzle/provider.py", line 130, in search_for
packages = self.search_for_vcs(dependency)
File "/tmp/poetry/lib/poetry/puzzle/provider.py", line 167, in search_for_vcs
package = self.get_package_from_vcs(
File "/tmp/poetry/lib/poetry/puzzle/provider.py", line 204, in get_package_from_vcs
package = cls.get_package_from_directory(tmp_dir, name=name)
File "/tmp/poetry/lib/poetry/puzzle/provider.py", line 343, in get_package_from_directory
raise RuntimeError(
Is poetry unable to get dynamically generated versions?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:25 (7 by maintainers)
Top Results From Across the Web
Error when installing detectron2 from source #1445 - GitHub
I recently updated my Cuda toolkit version to 10.2 as well as Pytorch to 1.5 and I was trying to rebuild detectron2 from...
Read more >Installation — detectron2 0.6 documentation
To rebuild detectron2 that's built from a local clone, use rm -rf build/ **/*.so to clean the old build first. You often need...
Read more >How to Install Detectron2 on Windows 10 or 11 - Medium
Step 1: Install Anaconda for windows · Step 2: Download Cuda 10.2 and install it · Step 3: Create a conda environment ·...
Read more >Can't build Detectron2 on Windows 10 - Stack Overflow
conda install -c anaconda ninja. Go to the directory where I want to install detectron2. e: cd e:/TRON. Git clone detectron2 repository.
Read more >Detectron2 Installation on windows issue - PyTorch Forums
Hello, I am trying to install Detector2 on my Windows 11 machine. I am facing below error can you guide me to solve...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@malcolmgreaves for completeness this is what you need to keep legacy build.
@malcolmgreaves I just tried your workaround to integrate detectron2 with an existing project but still get errors… 😕
My pyproject.toml looks like this:
However, when I run
poetry install
, I get:Any idea why that might be the case?