question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poetry doesn't find any version for the package Babel

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).

  • Ubuntu 18.04:

  • 0.12.17:

Issue

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 <you@example.com>"]

[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"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

88reactions
stinovlascommented, Sep 24, 2019

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?

13reactions
eayin2commented, Aug 6, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

poetry install | SolverProblemError Because my_project ...
This is why you receive the message Because my_project depends on string (*) which doesn't match any versions, version solving failed. , which ......
Read more >
Wittgenstein on AI, Poetry, and Babel - by Zohar Atkins
This argument is part and parcel of what is called “ordinary language philosophy”—the idea that we know the meaning of words by using...
Read more >
relaxed-poetry - PyPI
This project is a poetry fork. It serves as a relaxed version of poetry (currently based on version 1.2.0a2). Poetry is a great...
Read more >
poetry can't find version of dependency even though it exists
When bumping my python version from 3.7 to 3.8 in poetry, reinstalling all the dependencies fail with a version of the following:
Read more >
Using Python environments in VS Code
When you install into a virtual environment, any packages you install are installed only in ... Note: If the Python extension doesn't find...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found