7

I'm using Python 3.6.5 with pyenv. pip 10 came out a while ago but pyenv is creating my new virtual environments with pip 9.0.3 and i have to update each one of them manually. It's annoying.

I tried to update pyenv and re-installing Python version (i was hoping it will come with newer pip version but it didn't.) but no success.

Should i wait for an update on pyenv side or am i missing something?

ulgens
  • 129
  • 1
  • 3
  • 10

1 Answers1

8

You just need to upgrade the pip package with pip install --upgrade pip.

EDIT: This was already answer here.

EDIT2: You can update pip on your python distribution directly if you can and use the virtualenv's flag ‘ --system-site-packages‘ to depend on the system package you have installed previously.

TwistedSim
  • 1,787
  • 6
  • 20
  • 1
    That's the problem i'm already asking, i don't want to update pip from inside of virtualenv manually, i want pyenv to install them with newest version. – ulgens Apr 17 '18 at 06:34
  • 6
    Actually pyenv doesn't manage version of pip by default. If you create a virtualenv with virtualenv or pyenv-virtualenv, you end up with the default version of pip which is 9.0.3 at the moment (https://pypi.org/project/virtualenv/). – TwistedSim Apr 17 '18 at 13:48
  • 1
    Oh, that's the answer i was looking for. Thanks. – ulgens Apr 18 '18 at 00:51
  • I found that I needed to run `python -m pip install -- upgrade pip` instead of `pip install -- upgrade pip` as I do have pyenv shim for pip. So I suppose that if I wanted pip outside of my PYENV, I would update with homebrew or macprots. – Jeffrey Goldberg Nov 13 '21 at 17:47