install This is best. https://github.com/shogito/ansible-pyenv
virtualenv via pyenv virtualenv
python
#create venv
pyenv virtualenv <venv-name>
#activate venv
pyenv activate <venv-name>
#deactivate venv
pyenv deactivate <venv-name>
#list venvs
pyenv virtualenvs
#delete venv
pyenv uninstall <venv-name>
virtualenvwrapper via pyenv
python
#enable workon command
pyenv virtualenvwrapper
#create venv
mkvirtualenv <venv-name>
#workon...
workon <venv-name>
use venv from cron or shell-script
python
# 1st activate some venv
which python
~/.virtualenvs/<venv-name>/bin/python
# call
~/.virtualenvs/<venv-name>/bin/python <python script path> <args>...
Recommended Posts