-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
python-poetry/poetry-core
#324Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
- 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 (
-vvvoption).
- OS version and name: Windows 10 1909 x64
- Poetry version: 1.1.4
- Python version: 3.8.7 amd64
- Link of a Gist with the contents of your pyproject.toml file: (please see below)
Issue
First, thank you for your work on poetry!
When executing poetry install and having specified multiple constraints dependencies with path dependencies, the solver tries to install both versions despite mutually excluding python restrictions. The wheels mentioned in the pyproject.toml are from here.
pyproject.toml
[tool.poetry]
name = "fokr"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]
[tool.poetry.dependencies]
python = "^3.8"
pyproj = [
{path = ".python/pyproj-2.6.0-cp38-cp38-win_amd64.whl", python = "~3.8", markers = "sys_platform == 'win32'"},
{path = ".python/pyproj-3.0.0.post1-cp39-cp39-win_amd64.whl", python = "~3.9", markers = "sys_platform == 'win32'"},
]
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
Console Output
Using virtualenv: D:\***\.venv
Updating dependencies
Resolving dependencies...
1: fact: fokr is 0.1.0
1: derived: fokr
0: Duplicate dependencies for pyproj
1: fact: fokr depends on pyproj (2.6.0 .python\pyproj-2.6.0-cp38-cp38-win_amd64.whl)
1: fact: fokr depends on pyproj (3.0.0.post1 .python\pyproj-3.0.0.post1-cp39-cp39-win_amd64.whl)
1: selecting fokr (0.1.0)
1: derived: pyproj (3.0.0.post1 .python\pyproj-3.0.0.post1-cp39-cp39-win_amd64.whl)
1: conflict: fokr depends on pyproj (2.6.0 .python\pyproj-2.6.0-cp38-cp38-win_amd64.whl)
1: ! not pyproj (2.6.0 .python\pyproj-2.6.0-cp38-cp38-win_amd64.whl) is satisfied by pyproj (3.0.0.post1 .python\pyproj-3.0.0.post1-cp39-cp39-win_amd64.whl)
1: ! which is caused by "fokr depends on pyproj (3.0.0.post1 .python\pyproj-3.0.0.post1-cp39-cp39-win_amd64.whl)"
1: ! thus: version solving failed
1: Version solving took 0.217 seconds.
1: Tried 1 solutions.
Stack trace:
8 d:\***\.python\python\lib\site-packages\clikit\console_application.py:131 in run
129│ parsed_args = resolved_command.args
130│
→ 131│ status_code = command.handle(parsed_args, io)
132│ except KeyboardInterrupt:
133│ status_code = 1
7 d:\***\.python\python\lib\site-packages\clikit\api\command\command.py:120 in handle
118│ def handle(self, args, io): # type: (Args, IO) -> int
119│ try:
→ 120│ status_code = self._do_handle(args, io)
121│ except KeyboardInterrupt:
122│ if io.is_debug():
6 d:\***\.python\python\lib\site-packages\clikit\api\command\command.py:171 in _do_handle
169│ handler_method = self._config.handler_method
170│
→ 171│ return getattr(handler, handler_method)(args, io, self)
172│
173│ def __repr__(self): # type: () -> str
5 d:\***\.python\python\lib\site-packages\cleo\commands\command.py:92 in wrap_handle
90│ self._command = command
91│
→ 92│ return self.handle()
93│
94│ def handle(self): # type: () -> Optional[int]
4 d:\***\.python\python\lib\site-packages\poetry\console\commands\install.py:71 in handle
69│ self._installer.verbose(self._io.is_verbose())
70│
→ 71│ return_code = self._installer.run()
72│
73│ if return_code != 0:
3 d:\***\.python\python\lib\site-packages\poetry\installation\installer.py:103 in run
101│ local_repo = Repository()
102│
→ 103│ return self._do_install(local_repo)
104│
105│ def dry_run(self, dry_run=True): # type: (bool) -> Installer
2 d:\***\.python\python\lib\site-packages\poetry\installation\installer.py:235 in _do_install
233│ )
234│
→ 235│ ops = solver.solve(use_latest=self._whitelist)
236│ else:
237│ self._io.write_line("Installing dependencies from lock file")
1 d:\***\.python\python\lib\site-packages\poetry\puzzle\solver.py:65 in solve
63│ with self._provider.progress():
64│ start = time.time()
→ 65│ packages, depths = self._solve(use_latest=use_latest)
66│ end = time.time()
67│
SolverProblemError
Because fokr depends on both pyproj (2.6.0 .python\pyproj-2.6.0-cp38-cp38-win_amd64.whl) and pyproj (3.0.0.post1 .python\pyproj-3.0.0.post1-cp39-cp39-win_amd64.whl), version solving failed.
at d:\***\.python\python\lib\site-packages\poetry\puzzle\solver.py:241 in _solve
237│ packages = result.packages
238│ except OverrideNeeded as e:
239│ return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
240│ except SolveFailure as e:
→ 241│ raise SolverProblemError(e)
242│
243│ results = dict(
244│ depth_first_search(
245│ PackageNode(self._package, packages), aggregate_package_nodesReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected