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.

pip version in venv is old, doesn't support --require-hashes

See original GitHub issue

When I create a new venv, the version of pip installed is really old (1.5.6). How do I update this?

OS Type: #CentOS Linux release 7.0.1406 (Core) Python version: $ python -V: Python 2.7.5 Pipenv version: $ pipenv --version : pipenv, version 8.2.7

$ pipenv install Creating a virtualenv for this project… ⠋New python executable in /home/user/.local/share/virtualenvs/pipenv-iAtZuLQ4/bin/python Installing setuptools, pip…done.

Virtualenv location: /home/user/.local/share/virtualenvs/pipenv-iAtZuLQ4 Creating a Pipfile for this project… Pipfile.lock not found, creating… Locking [dev-packages] dependencies… Locking [packages] dependencies… Updated Pipfile.lock (c23e27)! Installing dependencies from Pipfile.lock (c23e27)… 🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00 To activate this project’s virtualenv, run the following: $ pipenv shell

$ pipenv run pip --version pip 1.5.6 from /home/user/.local/share/virtualenvs/pipenv-iAtZuLQ4/lib/python2.7/site-packages (python 2.7)

Expected result

I expected that if the embedded pip version wasn’t the latest, that I could somehow update it.

Actual result

The version of pip is still really old:

$ pipenv --update All good! $ pipenv run pip --version pip 1.5.6 from /home/user/.local/share/virtualenvs/pipenv-iAtZuLQ4/lib/python2.7/site-packages (python 2.7)

This really really old pip version also means I can’t install from the lock file, as it uses a pip flag that doesn’t exist in this version:

$ pipenv install Locking [dev-packages] dependencies… Locking [packages] dependencies… Installing dependencies from Pipfile.lock (b5ac99)… An error occurred while installing enum34==1.1.6! Will try again. An error occurred while installing cx-oracle==5.1.3! Will try again. An error occurred while installing django-tables2==1.13.0! Will try again. An error occurred while installing django==1.10.2! Will try again. 🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 4/4 — 00:00:00 Installing initially–failed dependencies… ☤ ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/4 — 00:00:00

Usage: pip install [options] <requirement specifier> … pip install [options] -r <requirements file> … pip install [options] [-e] <vcs project url> … pip install [options] [-e] <local project path> … pip install [options] <archive url/path> …

no such option: --require-hashes

☤ ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/4 — 00:00:00

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
erinxoconcommented, Oct 24, 2017

Hi @scott-burgess! That’s odd. What is the version of pip installed with your system python(s)? You should be able to run pipenv run pip install --upgrade pip to upgrade the virtualenvs pip to the latest version.

1reaction
kitsundecommented, Jan 31, 2018

Same issue, but instead caused by having an outdated system virtualenv (my system pip was fine). Solved with sudo pip install virtualenv --upgrade

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get "python -m venv" to directly install latest pip version
You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
Read more >
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 >
pipenv Documentation - Read the Docs
Generates and checks file hashes for locked dependencies when installing from Pipfile.lock. • Automatically install required Python version when pyenv is ...
Read more >
Dependency Management With Python Poetry
Learn how Python Poetry will help you start new projects, maintain existing ones, and master dependency management.
Read more >
Making pip installs a little less slow - Python⇒Speed
Make sure you're using the latest version of pip before installing dependencies. Binary wheels sometimes require newer versions of pip than the ...
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