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.

Which pip version does poetry use?

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

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:

Command ['/root/.cache/pypoetry/virtualenvs/hybrid-py3.7/bin/pip', 'install'  
, '--no-deps', 'cryptography==2.4.2'] errored with the following output:      
Collecting cryptography==2.4.2                                                
  Downloading https://files.pythonhosted.org/packages/f3/39/d3904df7c56f8654  
691c4ae1bdb270c1c9220d6da79bd3b1fbad91afd0e1/cryptography-2.4.2.tar.gz (468k  
B)                                                                            
  Could not find a version that satisfies the requirement cffi!=1.11.3,>=1.7  
 (from versions: )                                                            
No matching distribution found for cffi!=1.11.3,>=1.7                         
You are using pip version 10.0.1, however version 18.1 is available.    

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 before poetry install, but I guess my question where poetry gets the idea to use 10.0.1 from still holds? 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:38
  • Comments:29 (13 by maintainers)

github_iconTop GitHub Comments

14reactions
TheButlahcommented, Jun 24, 2020

Still running into issues with this on a daily basis - many packages fail to install in the older pip version, which causes poetry install to break

10reactions
mirosvalcommented, Mar 8, 2021

why was this closed? As far as I can tell this is still an issue.

I tried to install scipy on macOS, but because it does not work with the Accelerate backend as of 1.6.0, it can’t be built. There is a wheel, but a newer pip is required to install it.

What is the recommended approach in this case?

Read more comments on GitHub >

github_iconTop Results From Across the Web

poetry - PyPI
Poetry: Python packaging and dependency management made easy. Stable Version Pre-release Version Python Versions Download Stats Discord.
Read more >
Managing environments | Documentation - Poetry
By default, Poetry will try to use the Python version used during Poetry's installation to create the virtual environment for the current project....
Read more >
Dependency Management With Python Poetry
Learn how Python Poetry will help you start new projects, maintain existing ones, ... This command will display your current Poetry version.
Read more >
How to get python-poetry to detect a version of pip within a ...
2 Successfully installed pip-22.3 (venv) local-forks/isort >> pip --version pip 22.3 from /Users/MyUser/local-forks/isort/venv/lib/python3.10/ ...
Read more >
Stop using Pip, use Poetry Instead! | by Nick Anthony | Medium
Alright I admit this headline is a little click-baity, since technically Poetry uses pip to install packages anyways, regardless, today I want ...
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