-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which pip version does poetry use? #732
Comments
This is most likely related: #712 |
I just ran into this as well and think it is a separate issue.
The next issue is that packages that require certain versions of However, even if an explicit dependency on For now manually upgrading |
Checked our packages and there are a lot with As a tactical solution A "proper" implementation of setup requirements/build system might in a worst-case scenario require virtual environments separate from the target virtual environment to build packages. I'd suspect this would be a lot more effort and since today very few packages actually declare their setup requirements properly likely in vain. @sdispater what do you think? |
@asodeur The thing is that it's a tricky subject. Poetry uses Also, if I am not sure what the best approach is to be honest. |
Ok, than I'd propose to simply upgrade |
I am confused too by this. I wish poetry would use the latest pip version available (or simply the one already installed). Here's the simplest reproducible case:
> poetry install -vv
Creating virtualenv piptest-py3.7 in /Users/nbigaouette/tmp/piptest/.venv
Using virtualenv: /Users/nbigaouette/tmp/piptest/.venv
Updating dependencies
Resolving dependencies...
1: fact: piptest is 0.1.0
1: derived: piptest
1: selecting piptest (0.1.0)
1: Version solving took 0.005 seconds.
1: Tried 1 solutions.
Writing lock file
Nothing to install or update
> poetry run pip -V
pip 19.0.3 from /Users/nbigaouette/tmp/piptest/.venv/lib/python3.7/site-packages/pip (python 3.7) But: > ~/.python/3.7.3/bin/pip -V
pip 19.1.1 from /Users/nbigaouette/.python/3.7.3/lib/python3.7/site-packages/pip (python 3.7) Since poetry doesn't uses pip from the initial Python install directory (the latest), the first step of every poetry package install is to actually upgrade pip, which seems to defeat poetry's goal (since it needs pip to do the install...) |
The proposed solution does not seem to work anymore, at least for me. Whenever I try to upgrade pip inside of poetry, I run into the following error:
I was not able to find the root of this issue. Does this have something to do with the problems that poetry and pip have? |
As @asodeur pointed out this is an issue with It would be nice to fix this but I think any fix should maintain the ability to create virtualenvs without internet access. Perhaps it could be a command line arguement or setting? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This still seems like a valid bug. |
Hi, we are facing the same issue where we did a following on a fresh windows machine:
Can you help me with this? How do i force poetry to use a specific pip version? |
@pavanmr94 a hacky workaround to get you through these dark times: $ # Upgrades pip in a newly-installed virtualenv
$ poetry run pip install pip==18.1
$ # Installs your project dependencies, but with the correct version of pip
$ poetry install |
@pappasam Thanks, we ended up doing just that. |
The inconsistencies experienced with poetry using an older version of pip than the system installed one/pyenv one are causing a lot of problems for me. For example, for an unknown reason Also, having an older version of pip than the system one means that someone might do Additionally, no amount of workarounds in the pyproject.toml file seem to fix it:
(pip remains version 18) I suggest as a temporary fix to upgrade poetry's vendored pip to a version at least as new as the system/pyenv one upon install |
Ran into the same issue and your solution fixed it for me. |
I had to use Otherwise I would get this error when installing a certian package that requires a new version of both (:
Poetry seems to ignore both |
Still running into issues with this on a daily basis - many packages fail to install in the older pip version, which causes |
I have the same issue. Lots of packages (e.g., |
why was this closed? As far as I can tell this is still an issue. I tried to install What is the recommended approach in this case? |
I am running into this as well; specifically with |
Maybe @abn can shed some light here? |
The All this said, depending on how you installed Further, with #2826, we are no longer installing Hope this helps. |
@abn at what point can we begin adding |
The change is in master and the next 1.2.0 pre-release should have it. |
Just install with ADMIN problem will solve |
On my work VPN pip installs packages successfully while poetry will not. On open internet both work just fine. Platform: Windows 10, pip 21.1, poetry 1.1.8, poetry-core 1.0.4 This is the error I get from poetry:
Could this be related to poetry using its own version of pip? I don't see this specific error searching the issues. |
Do we have an ETA for the 1.2 release to go live? |
FWIW, it feels like a similar problem is still around. Certain packages (e.g. |
The issue you have is unrelated -- it relates entirely to the issues I've linked you to in your previous issue. For those spelunking, this change has been partially reverted. The present state of things is this:
There are a lot of unrelated topics in the comments -- please start a Discussion or join Discord if you would like clarification on any of the points here. |
I am having the exact same issue. Any workaround found for this ? @mirosval |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Question
I was wondering how poetry chooses which pip version it uses when installing new packages? And how can we make it choose a different one?
I am asking this question because of the following problem I encountered:
While trying to install "cryptography" in a Docker container with poetry I got the following error message:
I found the error a little bit weird in the first place, because it does not occur when I run
poetry install
locally, but after a little bit of googling it seemed that the cffi problem was related to the pip version and should be fixable, by upgrading pip => which leads to my question: My dockerfile is based on python:3.7-alpine and has pip 18.1 installed, so why does poetry still try to use pip version 10.0.1?Thanks a lot to anyone taking the time to read through this :)
Edit: To fix my issue, I just had to do
poetry run pip install --upgrade pip
beforepoetry install
, but I guess my question where poetry gets the idea to use 10.0.1 from still holds? :)The text was updated successfully, but these errors were encountered: