安装pyenv virtualenv

地址:https://github.com/pyenv/pyenv-virtualenv

  1. Check out pyenv-virtualenv into plugin directory

    $ git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
  2. (OPTIONAL) Add pyenv virtualenv-init to your shell to enable auto-activation of virtualenvs. This is entirely optional but pretty useful. See "Activate virtualenv" below.

    $ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile

    Fish shell note: Add this to your ~/.config/fish/config.fish

    status --is-interactive; and source (pyenv virtualenv-init -|psub)

    Zsh note: Modify your ~/.zshenv file instead of ~/.bash_profile.

    Pyenv note: You may also need to add eval "$(pyenv init -)" to your profile if you haven't done so already.

  3. Restart your shell to enable pyenv-virtualenv$ exec "$SHELL"

   $ exec "$SHELL"



创建virtualenv:

pyenv  virtualenv  venv365

进入创建的env:

pyenv activate venv365

退出env

pyenv deactivate





猜你喜欢

转载自www.cnblogs.com/andu99/p/9271707.html