Skip to content

Instantly share code, notes, and snippets.

@mgoodfellow mgoodfellow/
Last active Mar 7, 2017

What would you like to do?
Quick script to create venv with patched pip version on Python 3.6 on Windows
# This is a handy script to apply a pip fix to the venv created by python 3.6 on Windows
# Written by Mike Goodfellow in a few minutes - feel free to improve this!!
# Based on information in
# NOTE: Currently works if python on path points to python3 which is commonly
# does on Windows.
if [ $# -ne 1 ]
echo "Usage: venv_init /path/to/venv"
exit 1
echo "Creating new venv in $1..."
# NOTE: This needs to be on the path...
python -m venv $1
echo "Applying the pip fix..."
rm -rf $1/Lib/site-packages/pip*
$1/Scripts/easy_install pip
$1/Scripts/pip install --upgrade pip setuptools
echo "Patched version of venv has been configured in $1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.