CoolFace
Apppublic

ngovu182002/test

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
activate71 linesDownload Raw Back to Scripts
1# This file must be used with "source bin/activate" *from bash*2# You cannot run it directly3 4deactivate () {5    # reset old environment variables6    if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then7        PATH="${_OLD_VIRTUAL_PATH:-}"8        export PATH9        unset _OLD_VIRTUAL_PATH10    fi11    if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then12        PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"13        export PYTHONHOME14        unset _OLD_VIRTUAL_PYTHONHOME15    fi16 17    # Call hash to forget past commands. Without forgetting18    # past commands the $PATH changes we made may not be respected19    hash -r 2> /dev/null20 21    if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then22        PS1="${_OLD_VIRTUAL_PS1:-}"23        export PS124        unset _OLD_VIRTUAL_PS125    fi26 27    unset VIRTUAL_ENV28    unset VIRTUAL_ENV_PROMPT29    if [ ! "${1:-}" = "nondestructive" ] ; then30    # Self destruct!31        unset -f deactivate32    fi33}34 35# unset irrelevant variables36deactivate nondestructive37 38# on Windows, a path can contain colons and backslashes and has to be converted:39if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then40    # transform D:\path\to\venv to /d/path/to/venv on MSYS41    # and to /cygdrive/d/path/to/venv on Cygwin42    export VIRTUAL_ENV=$(cygpath "C:\Users\Dell\pptxAI\venv")43else44    # use the path as-is45    export VIRTUAL_ENV="C:\Users\Dell\pptxAI\venv"46fi47 48_OLD_VIRTUAL_PATH="$PATH"49PATH="$VIRTUAL_ENV/Scripts:$PATH"50export PATH51 52# unset PYTHONHOME if set53# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)54# could use `if (set -u; : $PYTHONHOME) ;` in bash55if [ -n "${PYTHONHOME:-}" ] ; then56    _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"57    unset PYTHONHOME58fi59 60if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then61    _OLD_VIRTUAL_PS1="${PS1:-}"62    PS1="(venv) ${PS1:-}"63    export PS164    VIRTUAL_ENV_PROMPT="(venv) "65    export VIRTUAL_ENV_PROMPT66fi67 68# Call hash to forget past commands. Without forgetting69# past commands the $PATH changes we made may not be respected70hash -r 2> /dev/null71