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 install is stuck on specific dependency with "pending..."

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: 10.15.7
  • Poetry version: 1.1.4, 1.1.3, 1.0.9

Issue

Hello poetry crew. Loving the work that yall do!

I am having issues with poetry while running poetry install in one of my projects on one specific machine.

It appears to get stuck on one dependency during the install and it will hang forever. When I kill the process, I see this in my shell (hinting at a race condtion/locking problem):

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/Users/{}/.pyenv/versions/3.6.8/lib/python3.6/concurrent/futures/thread.py", line 40, in _python_exit
    t.join()
  File "/Users/{}/.pyenv/versions/3.6.8/lib/python3.6/threading.py", line 1056, in join
    self._wait_for_tstate_lock()
  File "/Users/{}/.pyenv/versions/3.6.8/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
    elif lock.acquire(block, timeout):
KeyboardInterrupt

I am on the latest poetry (1.1.4) and have tried 1.1.3 as well with the same results (all of which while running python 3.6.8 (I did use 3.6.5 as well)).

After downgrade to 1.0.9, I no longer faced this issue. I am assuming that there was an update to the way poetry can download multiple deps at the same time. Anyone else facing locking issues? At the very least, poetry should recognize a pending download with no progress being made to exit and fail early, but it simply hung and would never exit (left it going for at least 30 mins).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:18
  • Comments:32 (9 by maintainers)

github_iconTop GitHub Comments

24reactions
rbergercommented, Oct 5, 2022

The artifacts and cache dirs were in ~/Library/Caches/pypoetry on my M1 Mac for those who can’t find it in ~/.cache/pypoetry/cache/

cd ~/Library/Caches/pypoetry
rm -rf artifacts/ cache/

Doing that cleared things up for me. Before that, it was consistently hanging on trying to fetch flake8-bugbear from pypy

24reactions
sinoroccommented, Nov 24, 2020

I do not know how to help you all here…

My advice would be to try one of those (maybe in that order) if you have not yet:

  • delete the poetry.lock file and retry
  • delete the virtual environment and retry
  • deactivate the new (parallel) installer with poetry config experimental.new-installer false and retry (do not forget to reactivate it afterwards if it proves to have no influence)
  • or any combination of those

Also maybe provide some verbose output (-vvv), that might be helpful for when one of the maintainers gets the time to handle this ticket. Of course, the best as always is if you can provide a minimal reproducible example that triggers the failure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python[poetry] installation is getting stuck - Stack Overflow
My temporary workaround is to disable the keyring by setting an env var. export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring curl -sSL ...
Read more >
Python's poetry hangs while solving dependencies
Re: Python's poetry hangs while solving dependencies​​ poetry works fine here. You may want to run `poetry` with `-vvv` and post the output...
Read more >
FAQ | Documentation | Poetry - Python dependency ...
Once a release of your package is published, you cannot tweak its dependencies anymore in case a dependency breaks BC – you have...
Read more >
Troubleshoot an Amazon SageMaker notebook instance that's ...
The notebook instance appears to be stuck in this state, and then it fails. Short description. The Pending status means that SageMaker is...
Read more >
Configure a Poetry environment | PyCharm Documentation
Project dependencies are recorded in the pyproject.toml file that ... To use Poetry in PyCharm, you need to install it on your machine...
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