Deactivate pyenv in current shell

前端 未结 7 2070
日久生厌
日久生厌 2021-02-13 02:22

My .bashrc has this:

enable-pyenv () {
    # Load pyenv automatically by adding
    # the following to your profile:

    export PATH=\"$HOME/.pyenv/bin:$PATH\"
         


        
7条回答
  •  无人及你
    2021-02-13 03:13

    For me, what worked ultimately was the brute force method of removing all pyenv paths from the $PATH variable:

     PATH=`echo $PATH | tr ':' '\n' | sed '/pyenv/d' | tr '\n' ':' | sed -r 's/:$/\n/'`
    

    I wish pyenv offered a better way by itself.

提交回复
热议问题