#!/usr/bin/env bash # # Summary: Deactivate virtual environment # # Usage: pyenv deactivate # # Deactivate a Python virtual environment. set -e [ -n "$PYENV_DEBUG" ] && set -x shell="$(basename "${PYENV_SHELL:-$SHELL}")" case "$shell" in fish ) cat </dev/null 2>&1; then export PYENV_DEACTIVATE="\$PYENV_ACTIVATE"; unset PYENV_ACTIVATE; deactivate; fi; EOS ;; esac if [ -z "${PYENV_VIRTUALENV_INIT}" ]; then # Backward compatibility issue # https://github.com/yyuu/pyenv-virtualenv/issues/26 echo "pyenv shell --unset;" fi