[X] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
Ubuntu 18.04:
I added the package Babel to pyproject.toml, but poetry install fails to install. I tried writing Babel in small letters, but poetry doesn't find a version of it. If I run poetry search babel it is listed in the search results though. According to Babel's setup.py it should be compatible with my python version 3.6, see: https://github.com/python-babel/babel/blob/master/setup.py#L58
Error message
$ poetry install -vvv
Using virtualenv: /home/user/.cache/pypoetry/virtualenvs/my_app-py3.6
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.
[SolverProblemError]
Because my_app depends on babel (*) which doesn't match any versions, version solving failed.
Exception trace:
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/cleo/application.py in run() at line 94
status_code = self.do_run(input_, output_)
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/console/application.py in do_run() at line 88
return super(Application, self).do_run(i, o)
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/cleo/application.py in do_run() at line 197
status_code = command.run(input_, output_)
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/console/commands/command.py in run() at line 77
return super(BaseCommand, self).run(i, o)
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/cleo/commands/base_command.py in run() at line 146
status_code = self.execute(input_, output_)
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/cleo/commands/command.py in execute() at line 107
return self.handle()
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/console/commands/install.py in handle() at line 55
return_code = installer.run()
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/installation/installer.py in run() at line 73
self._do_install(local_repo)
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/installation/installer.py in _do_install() at line 229
ops = solver.solve(use_latest=whitelist)
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/puzzle/solver.py in solve() at line 38
packages, depths = self._solve(use_latest=use_latest)
/home/user/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/puzzle/solver.py in _solve() at line 180
raise SolverProblemError(e)
pyproject.toml
[tool.poetry]
name = "my_app"
version = "0.1.1"
description = ""
authors = ["Your Name <[email protected]>"]
[tool.poetry.dependencies]
python = "^3.6"
apscheduler = "3.0.5"
django = "*"
django_extensions = "*"
django_user_agents = "*"
facebook-sdk = "*"
fake_useragent = "*"
flask = "*"
flask_apscheduler_fork = "*"
helputils = "*"
lxml = "*"
numpy = "*"
paramiko = "*"
psutil = "*"
pymongo = "*"
python-digitalocean = "*"
pytz = "*"
regex = "*"
systemdunitextras = "*"
youtube_dl = "*"
watchdog = "*"
babel = "*"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
I have found the issue, instead of adding Babel = "*" to the dependencies manually, I should run poetry add Babel. The difference is that poetry adds the version to the package, e.g. Babel = "^2.7.0". I don't know why it doesn't work with Babel = "*" though
Also affects me, except that this time it is tb-nightly:
[tool.poetry.dependencies]
tb-nightly = "*"
$ poetry update -vvv
Using virtualenv: /home/shared/venv/dl-torch
Updating dependencies
Resolving dependencies...
1: fact: python.gate-detection is 0.1.0
1: derived: python.gate-detection
1: fact: python.gate-detection depends on tb-nightly (*)
1: selecting python.gate-detection (0.1.0)
1: derived: tb-nightly (*)
PyPI: 0 packages found for tb-nightly *
1: fact: no versions of tb-nightly match *
1: conflict: no versions of tb-nightly match *
1: ! tb-nightly (*) is satisfied by tb-nightly (*)
1: ! which is caused by "python.gate-detection depends on tb-nightly (*)"
1: ! thus: version solving failed
1: Version solving took 0.019 seconds.
1: Tried 1 solutions.
[SolverProblemError]
Because python.gate-detection depends on tb-nightly (*) which doesn't match any versions, version solving failed.
Exception trace:
/home/shared/conda3/lib/python3.7/site-packages/cleo/application.py in run() at line 94
status_code = self.do_run(input_, output_)
/home/shared/conda3/lib/python3.7/site-packages/poetry/console/application.py in do_run() at line 88
return super(Application, self).do_run(i, o)
/home/shared/conda3/lib/python3.7/site-packages/cleo/application.py in do_run() at line 197
status_code = command.run(input_, output_)
/home/shared/conda3/lib/python3.7/site-packages/poetry/console/commands/command.py in run() at line 77
return super(BaseCommand, self).run(i, o)
/home/shared/conda3/lib/python3.7/site-packages/cleo/commands/base_command.py in run() at line 146
status_code = self.execute(input_, output_)
/home/shared/conda3/lib/python3.7/site-packages/cleo/commands/command.py in execute() at line 107
return self.handle()
/home/shared/conda3/lib/python3.7/site-packages/poetry/console/commands/update.py in handle() at line 41
return installer.run()
/home/shared/conda3/lib/python3.7/site-packages/poetry/installation/installer.py in run() at line 73
self._do_install(local_repo)
/home/shared/conda3/lib/python3.7/site-packages/poetry/installation/installer.py in _do_install() at line 165
ops = solver.solve(use_latest=self._whitelist)
/home/shared/conda3/lib/python3.7/site-packages/poetry/puzzle/solver.py in solve() at line 38
packages, depths = self._solve(use_latest=use_latest)
/home/shared/conda3/lib/python3.7/site-packages/poetry/puzzle/solver.py in _solve() at line 180
raise SolverProblemError(e)
update [--no-dev] [--dry-run] [--lock] [--] [<packages>]...
poetry add shouldn't be the only method of adding dependency, and poetry runtime should be capable of resolving the right version from wildcard. This should be a bug
I have found the issue, instead of adding
Babel = "*"to the dependencies manually, I should runpoetry add Babel. The difference is that poetry adds the version to the package, e.g.Babel = "^2.7.0". I don't know why it doesn't work withBabel = "*"though
I have same problem, but with pysolr package. Package can be added only with command poerty add pysolr and it installs version 3.8.1 with adding to pyproject.toml line pysolr = "^3.8".
But when you manually add this line to the file and trying pysolr install - it raises error:
[SolverProblemError]
Because api depends on pysolr (^3.8) which doesn't match any versions, version solving failed.
I believe that when you update your dependencies pyproject.toml manually, you should run poetry lock to synchronize your poetry.lock with new pyproject.toml. When you try running poetry lock followed by poetry install, does it still fail?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.
Most helpful comment
I believe that when you update your dependencies
pyproject.tomlmanually, you should runpoetry lockto synchronize yourpoetry.lockwith newpyproject.toml. When you try runningpoetry lockfollowed bypoetry install, does it still fail?