Skip to content

Instantly share code, notes, and snippets.

@radist2s
Created February 21, 2019 21:33
Show Gist options
  • Save radist2s/51d9791ae9a75683e11b09fb23938c72 to your computer and use it in GitHub Desktop.
Save radist2s/51d9791ae9a75683e11b09fb23938c72 to your computer and use it in GitHub Desktop.
Trellis does not yet support Python 3.6.4 Troubleshooting
Use virtualenvwrapper
Installation
pip install virtualenvwrapper
source /usr/local/bin/virtualenvwrapper.sh
mkvirtualenv p3 # make default python 3.x environment
mkvirtualenv -p /usr/bin/python2.7 p2 # install python 2.7 environment
workon p2
pip install ansible==2.5.3.0
Usage
source /usr/local/bin/virtualenvwrapper.sh # maybe placed intro ~/.profile
workon p2 # use python 2.7
# ... normal deploy commands
# eg: ansible-playbook deploy.yml -e "site=example.com env=production"

workon p3 # use python 3.x if needed

# One line solution
source /usr/local/bin/virtualenvwrapper.sh && workon p2 && ansible-playbook deploy.yml -e "site=example.com env=production"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment