Skip to content

Instantly share code, notes, and snippets.

@gonghao
Last active July 14, 2020 17:17
Show Gist options
  • Save gonghao/eefc90f16ee102a5531b9f04e3af42ab to your computer and use it in GitHub Desktop.
Save gonghao/eefc90f16ee102a5531b9f04e3af42ab to your computer and use it in GitHub Desktop.
Upgrade python in venv
#export EXISTING_ENV_PATH="~/Sites/data/py-envs/crucio/"
cd $EXISTING_ENV_PATH
rm -f .Python
rm -f bin/pip{,3*}
rm -f bin/python{,3*}
rm -rf include/python3*
rm -f lib/python3*/*
rm -rf lib/python3*/distutils
rm -f lib/python3*/site-packages/easy_install.*
rm -rf lib/python3*/site-packages/pip
rm -rf lib/python3*/site-packages/pip-*.dist-info
rm -rf lib/python3*/site-packages/setuptools
rm -rf lib/python3*/site-packages/setuptools-*.dist-info
python3 -m venv $EXISTING_ENV_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment