pip version in venv is old, doesn't support --require-hashes
See original GitHub issueWhen 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:
- Created 6 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top GitHub Comments
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.Same issue, but instead caused by having an outdated system virtualenv (my system pip was fine). Solved with
sudo pip install virtualenv --upgrade