Created
July 14, 2023 18:43
-
-
Save serpro69/c876870c84cc1c1082fac1d472024648 to your computer and use it in GitHub Desktop.
python+virtualenv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# TODO convert to a role in https://github.com/serpro69/ansible-collection-devexp | |
# installs https://virtualenv.pypa.io/en/latest/index.html | |
# requires pipx - https://pypi.org/project/pipx/ | |
# pipx install virtualenv | |
# pip install --user --no-deps virtualenvwrapper # use no-deps to skip installing virtualenv via pip since it's installed via pipx | |
# export | |
pip install --user virtualenv virtualenvwrapper | |
if virtualenv --help >/dev/null 2>&1 && [ -f $HOME/.local/bin/virtualenvwrapper.sh ]; then | |
export WORKON_HOME=~/.virtualenvs | |
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 | |
export VIRTUALENVWRAPPER_VIRTUALENV=$(readlink -f $(which virtualenv)) | |
source "$HOME/.local/bin/virtualenvwrapper.sh" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment