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)
I expected that if the embedded pip version wasn't the latest, that I could somehow update it.
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]
pip install [options] -r
pip install [options] [-e]
pip install [options] [-e]
pip install [options]
no such option: --require-hashes
β€ ββββββββββββββββββββββββββββββββ 0/4 β 00:00:00
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.
@erinxocon Ahhh that's fixed the problem.
I believe the default system version of pip was 1.5.6 before upgrading.
Running pipenv run pip install --upgrade pip
has upgraded pip to 9.0.1.
Should that be something I'm required to do each time I install a virtual environment like this?
@scott-burgess No, if you upgrade your system python then it should pull from that. You can do that with a sudo pip install --upgrade pip
or without the sudo depending on where you have python installed. Thanks for using pipenv! Let me know if you have any other questions!
Note that if you use a pyenv installation of python you donβt have to touch your system install. I say this because I know RHEL derivatives can be finicky if you mess with system python but I suspect yum would upgrade this for you also.
On Oct 24, 2017, at 3:58 AM, erinxocon notifications@github.com wrote:
@scott-burgess No, if you upgrade your system python then it should pull from that. You can do that with a sudo pip install --upgrade pip or without the sudo depending on where you have python installed. Thanks for using pipenv! Let me know if you have any other questions!
β
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
@techalchemy same with macOS. I use homebrew pythons instead of the default system ones.
Thanks everyone, appreciate the help
Same issue, but instead caused by having an outdated system virtualenv (my system pip was fine). Solved with sudo pip install virtualenv --upgrade
Just ran into a similar issue... and it seems my solution going forwards is:
pipenv run pip install --upgrade pip setuptools
Most helpful comment
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.