Skip to content

Instantly share code, notes, and snippets.

@diversen
Last active February 23, 2022 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diversen/92ef3cf7290b457d541ae08c68e36668 to your computer and use it in GitHub Desktop.
Save diversen/92ef3cf7290b457d541ae08c68e36668 to your computer and use it in GitHub Desktop.
Install virtualenv locally without pip or being root or doing sudo
# This works with e.g. python 3.7
wget https://github.com/pypa/virtualenv/archive/refs/tags/16.7.10.tar.gz -O virtualenv-16.7.10.tar.gz
tar xvfz virtualenv-16.7.10.tar.gz
rm virtualenv-16.7.10.tar.gz
mv virtualenv-16.7.10 ~/.virtualenv
echo >> ~/.bashrc
echo "alias virtualenv='python $HOME/.virtualenv/virtualenv.py'" >> ~/.bashrc
echo 'Now run: source ~/.bashrc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment