Poetry is extremely slow when resolving the dependencies

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

Issue

I created an empty project and run poetry add allennlp. It takes ages to resolve the dependencies.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:395
  • Comments:271 (42 by maintainers)

github_iconTop GitHub Comments

172reactions
yalunrencommented, Mar 8, 2020

Yes, i’m running into the same problem. Resolving dependencies takes forever. I tried to use VPN to get through the GFW, nevertheless, it is still not working. I also tried to change pip source and wrote local source in the toml file, neither works. It’s driving me nuts.

截屏2020-03-09上午12 28 19

140reactions
pradyunsgcommented, Apr 19, 2020

First, it’s capitalized PyPI.

Second, there is no way for PyPI to know dependencies for all packages without executing arbitrary code – which is difficult to do safely and expensive (computationally and financially). PyPI is run on donated infrastructure from sponsors, maintained by volunteers and does not have millions of dollars of funding like many other language ecosystems’ package indexes.


For anyone interested in further reading, here’s an article written by a PyPI admin on this topic: https://dustingram.com/articles/2018/03/05/why-pypi-doesnt-know-dependencies/

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ | Documentation | Poetry - Python dependency ...
FAQ Why is the dependency resolution process slow? While the dependency resolver at the heart of Poetry is highly optimized and should be...
Read more >
Tangent: Poetry can have very slow dependency resolution. It ...
Tangent: Poetry can have very slow dependency resolution. It doesn't cut to the core of the problem: Pypi doesn't enforce clearly specifying dependencies....
Read more >
Python's poetry hangs while solving dependencies
FWIW my experience is poetry tends to be unpredictably slow. 15 minutes might not be long enough. And it might depend on what...
Read more >
Speed up Python Poetry dependancy resolution
First run: poetry cache clear pypi --all. Then run poetry lock.
Read more >
poetry-python: profile slow dependency resolution - Reddit
I added one of our private packages (via Github url) to a new poetry project and am at over 30mins of dependency resolution....
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