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.

How do I tell pipenv which version of pip to use?

See original GitHub issue

Pip 18.1 is quite buggy, constantly throwing up TypeError: 'module' object is not callable and breaking installs on Windows machines, so I’d like to tell pipenv to only ever use 18.0 until pip gets a fix in some next version. However, while there is a pipenv --python ... command, there does not appear to be a pipenv --pip 18.0 that I can set to ensure pipenv doesn’t use the wrong pip version.

I can’t find any mention about this in the docs, so: how do I make pipenv use an explicit version of pip when invoking it? Or even better, how do I configure pipenv so that it picks my preferred version of pip by default, unless I tell it not to using a flag?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
juanitosvqcommented, May 3, 2021

Hey I came across this issue while trying to get my environment to run with the latest version of pip v21.1.1.

I’ve managed to make this work by using pipenv run python -m pip install pip==18.0 but that’s kind of a crazy amount of indirection just to make pipenv use a specific version of pip =)

Is this the only way we can specify which version of pip to run in the environment? Thanks in advance.

UPDATE: It’s possible to set an environment variable to specify the version of pip to use by the virtual environment:

export VIRTUALENV_PIP=21.1.1
1reaction
Pomaxcommented, Nov 1, 2018

I’ve managed to make this work by using pipenv run python -m pip install pip==18.0 but that’s kind of a crazy amount of indirection just to make pipenv use a specific version of pip =)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Usage of Pipenv - Read the Docs
Specify your target Python version in your Pipfile 's [requires] section. Ideally, you should only have one target Python version, as this is...
Read more >
what version of pip pipenv use? - python - Stack Overflow
I'm a little confused here, I just ran pipenv check to see what vulnerabilities I have in my project, and this is the...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
By default, Pipenv will initialize a project using whatever version of python the system has as default. Besides starting a project with the...
Read more >
How to Manage your Python Projects with Pipenv and Pyenv
If you use Pyenv, the pipenv install command will use the global Python version of your system. But as you know, you can...
Read more >
pipenv · PyPI
Use a lower-level pip command: $ pipenv run pip freeze ... version-controlled dependencies in editable mode, using pipenv install -e , in order...
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