Pyenv choose virtualenv directory

后端 未结 3 437
我在风中等你
我在风中等你 2021-01-04 18:41

I just began to use pyenv to manage my python versions, and began to use the pyenv virtualenv plugin to manage my virtualenvs, and so far, I have loved it. One thing I miss

3条回答
  •  -上瘾入骨i
    2021-01-04 19:20

    There's a workaround

    In your project directory, create a .python-version file. Assuming you already installed some virtual environment using pyenv-virtualenv, then append this line to it(you may want to change the version number):

    3.7.1/envs/your-project-name@3.7.1
    

    Whenever you enter into the directory, the correct python version will be used, and it works pretty well.

提交回复
热议问题