pyenv-autoenv is a pyenv plugin that
will automatically create and upgrade your project's virtualenv.
Install using git:
$ git clone https://github.com/strokirk/pyenv-autoenv.git $(pyenv root)/plugins/pyenv-autoenvUpgrade by removing and reinstalling, or with git:
$ git --git-dir $(pyenv root)/plugins/pyenv-autoenv/.git pullTo create the virtualenv of a project, simply run pyenv autoenv and let
the magic happen.
It will create a virtualenv named after the current directory using the latest available Python version.
To specify a specific Python version, use the --python flag.
$ pyenv autoenv --python 3.X.YTo customize the name of the created virtualenv, use the --name flag.
$ pyenv autoenv --name venv-nameTo recreate the virtualenv even if one already exists, use the --clear flag.
$ pyenv autoenv --clearIf you only want to recreate the virtualenv when you're using an older
version than the recommended one for the proejct, use the --clear-if-lower flag.
$ pyenv autoenv --clear-if-lower