poetry should upgrade pip and setuptools in virtualenvs it creates
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.
-
OS version and name: RHEL7.5
-
Poetry version: Poetry version 1.0.3
Issue
Poetry does not appear to upgrade the version of pip that appears in virtualenvs it creates and manages. This means that, in my case, I get an ancient pip 10.x that doesn’t know to use binary wheels, causing installs of packages to fail as I don’t have python-devel on the machines I deploy to.
When poetry creates a virtualenv, it should, as part of that process, upgrade pip to the latest version available, and continue to upgrade every time it’s about to do anything that installs or removes packages from a virtualenv.
The workaround for me is:
python3.6 `which poetry` shell
pip install -U pip
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:14 (1 by maintainers)
Top Results From Across the Web
How to get python-poetry to detect a version of pip within a ...
I'm playing around with a fork of isort, using this installation guide but including a virtualenv —though a platform install fails as well ......
Read more >Poetry and Outdated Pip and Setuptools - PS, codes.
After creating an environment, running $ poetry run python -m pip install --upgrade setuptools pip would always yield output such as this:
Read more >Upgrade Your Python Project With Poetry | The NTC Mag
Poetry will automatically install all the dependencies with poetry install (this replaces for pip install -r requirements.txt , python ...
Read more >Announcing Poetry 1.2.0 | Blog
Poetry 1.2 will properly lock and manipulate the versions of setuptools, pip, and wheel in the target environment. This is to support projects ......
Read more >Project Summaries - Python Packaging User Guide
Pipenv is a project that aims to bring the best of all packaging worlds to the Python world. It harnesses Pipfile, pip, and...
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 have an idea: maybe pip’s version should be put into
pyproject.toml
, just like python’s version:It can be special-cased so that
poetry update
will not update it, just like python, unlesspoetry update pip
is called. Initially, poetry can specify a version (range) that it thinks is safe for it.Here is another example why this is useful: The latest PyQt5 release 5.14.1 switches to the manylinux2014 platform tag, so it’s wheel can only be handled by a very recent pip (only pip versions >= 19.3 recognize this platform tag). If pip’s version can be put into
pyproject.toml
, it looks like:Then there is no need for any manual upgrade of pip when the project is installed.
I think the default behavior is appropriate, pip has been known to make changes that break Poetry, so auto-updating seems dangerous. This is probably more of a feature request for maybe a config setting to auto-update?
As a very slightly easier command you can do
poetry run pip install --upgrade pip