Poetry can't add any package anymore in a reasonable amount of time
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Issue
Here’s my env:
- macOS Big Sur
- pyenv (Python 3.10)
- Poetry version
1.1.12
(installed with pipx) - My config
$ poetry config --list
cache-dir = "/myPath"
experimental.new-installer = true
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.path = "{cache-dir}/virtualenvs" # /myPath/virtualenvs
I have worked with poetry smoothly so far. Suddenly, it looks like poetry can’t resolve dependencies anymore in a reasonable amount of time. It happens, for example, with pytest
. This is my starting pyproject.toml
click to expand my pyproject.toml
[tool.poetry]
name = "foo"
version = "0.1.0"
description = ""
authors = ["Foo <foo@example.org>"]
# ciao
[tool.poetry.dependencies]
python = "^3.9"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
if I run $ poetry add pytest --dev -vvv
I get this output (ie: poetry stuck in Resolving dependencies… )
click to expand command output
Using virtualenv: /projectPath/foo/.venv
PyPI: 147 packages found for pytest *
Using version ^6.2.5 for pytest
Updating dependencies
Resolving dependencies...
1: fact: foo is 0.1.0
1: derived: foo
1: fact: foo depends on pytest (^6.2.5)
1: fact: foo depends on pytest (^6.2.5)
1: selecting foo (0.1.0)
1: derived: pytest (>=6.2.5,<7.0.0)
PyPI: 1 packages found for pytest >=6.2.5,<7.0.0
1: fact: pytest (6.2.5) depends on attrs (>=19.2.0)
1: fact: pytest (6.2.5) depends on iniconfig (*)
1: fact: pytest (6.2.5) depends on packaging (*)
1: fact: pytest (6.2.5) depends on pluggy (>=0.12,<2.0)
1: fact: pytest (6.2.5) depends on py (>=1.8.2)
1: fact: pytest (6.2.5) depends on toml (*)
1: fact: pytest (6.2.5) depends on atomicwrites (>=1.0)
1: fact: pytest (6.2.5) depends on colorama (*)
1: selecting pytest (6.2.5)
1: derived: colorama
1: derived: atomicwrites (>=1.0)
1: derived: toml
1: derived: py (>=1.8.2)
1: derived: pluggy (>=0.12,<2.0)
1: derived: packaging
1: derived: iniconfig
1: derived: attrs (>=19.2.0)
PyPI: 42 packages found for colorama *
^C 1: Version solving took 93.503 seconds.
1: Tried 1 solutions.
As you can see, I stopped the process after 96s. I can’t understand what is going on and why it suddenly started taking so long for installing just pytest
. How can I fix it up?
PS: this issue started after installing ruamel.yaml
with poetry. I’m quite sure it was just a coincidence. But that is what happened.
PPS: the issue persists also after clearing cache with $ poetry cache clear --all pypi
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Ask HN: Why Poetry did not become a mainstream package ...
Personally, I use pipenv (manages package dependencies and sub-dependencies), pyenv (python version management), and pyenv-virtualenv (creates ...
Read more >Python package built with Poetry does not install supporting ...
I'm writing a Python package (assume it's "mypkg") and using Poetry ... I can't find the top level tests|scripts|data directories anywhere.
Read more >A Poetic Apology. Or Why Should You Use Poetry to Manage…
If you ever spent some time trying to write a Python application you have ... Poetry, and make an argument about why you...
Read more >Dependency Management With Python Poetry
When your Python project relies on external packages, you need to make sure you're using the right version of each package.
Read more >"Family Words and Story Poems" | Library of Congress
In my heart and soul for all of time, past every obstacle imaginable ... loving and supportive family by choosing to allow only...
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
Edit: Looks like I can’t even start a new project from scratch
…still hanging
See also https://github.com/python-poetry/poetry/issues/2094#issuecomment-1106447343 as a possible solution