How to automatically activate virtualenvs when cd'ing into a directory

后端 未结 12 1989
北海茫月
北海茫月 2020-12-24 06:27

I have a bunch of projects in my ~/Documents. I work almost exclusively in python, so these are basically all python projects. Each one, e.g. ~/Documents/

12条回答
  •  無奈伤痛
    2020-12-24 06:42

    By far the easiest option (in 2019+) is to add virtualenvwrapper into your ~/.zshrc plugins

    For example:

    plugins=(
      git pip python brew virtualenvwrapper
    )
    

提交回复
热议问题