Skip to content

Instantly share code, notes, and snippets.

@gargolito
Created May 28, 2020 02:27
Show Gist options
  • Save gargolito/378a9ae3ba2a8d096abd547ec0393750 to your computer and use it in GitHub Desktop.
Save gargolito/378a9ae3ba2a8d096abd547ec0393750 to your computer and use it in GitHub Desktop.
pyenv versions and virtualenv always upgrade pip and add preferred packages
git clone https://github.com/jawshooah/pyenv-default-packages.git \
$(pyenv root)/plugins/pyenv-default-packages
python -c "\
import pip;
from os import environ
pipver=str(float('.'.join(pip.__version__.split('.')[:-1])));
pkgs=[pipver,'ipython', 'pipreqs', 'pytest', 'vulture'];
f=open(environ['PYENV_ROOT'] + '/default-packages','w');
f.write('pip > {}\n'.format('\n'.join(pkgs)));
f.close()"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment