Poetry package install time seems longer than installing with pip
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).~ (Does not apply)
- OS version and name: docker image (
python:3-7-stretch
) running on CircleCI - Poetry version: 0.11.2
- Link of a Gist with the contents of your pyproject.toml file: https://github.com/MichaelAquilina/S4/blob/5e3a103/pyproject.toml
Issue
I am reasonably sure that installing packages using poetry install
instead of pip install
takes significantly longer.
To compare. Here is a pip install
taking 35 seconds: https://circleci.com/gh/MichaelAquilina/S4/464#action-103
Here is another build with poetry install
and the same requirements taking 1:27 seconds: https://circleci.com/gh/MichaelAquilina/S4/521#action-104
In both cases, both dev and non dev requirements were installed.
Issue Analytics
- State:
- Created 5 years ago
- Comments:29 (9 by maintainers)
Top Results From Across the Web
FAQ | Documentation | Poetry - Python dependency ...
Thus, dependencies are resolved by pip in the first place. But afterwards we run Poetry, which will install the locked dependencies into the...
Read more >Installing a python project using Poetry in a Docker container
Is there any way to avoid re-downloading dependencies using poetry, like putting pip install -r requirements.txt before copying project data to ...
Read more >Ask HN: Why Poetry did not become a mainstream package ...
It works /so much better/ than regular pip. Pipenv installs the right versions for the dependencies needed for the package you are installing, ......
Read more >Pipenv: promises a lot, delivers very little | Chris Warrick
installs Django using pip. proceeds to write Pipfile.lock , which stores the exact version and source file hash [2] of each package ......
Read more >Announcing Poetry 1.2.0 -- Python dependency management ...
That seems like an overreaction: the old installer cannot install the ... ...setup-poetry.py , 5% of the time it would just choose to...
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 FreeTop 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
Top GitHub Comments
I intend to improve the installation part of Poetry sometime in the future to speed things up, yes. I can’t give you an ETA though, the only thing I can tell you is that it will likely be after the
1.0
milestone since I want to stabilize Poetry before changing critical parts, like this one.I’ll be sure to keep you posted if anything changes on that front.
Thanks for your interest in Poetry!
This is expected because Poetry orders the packages to install so that the deepest packages in the dependency graph are installed first to avoid errors at installation time. This requires sequential installation of the packages which takes longer but is more “secure”.
Also, Poetry checks hashes of installed packages for security reasons and due to the way
pip
works, Poetry has to generate a temporaryrequirements.txt
file to make pip check hashes. This adds an overhead which explains the difference between the two tools.