VSCode terminal shows incorrect python version and path, launching terminal from anaconda works perfectly

后端 未结 5 625
予麋鹿
予麋鹿 2021-02-05 17:03

I have been stuck on this one problem for hours now and believe I have tried everything outside of throwing my computer out of the window.

I have a virtual environment s

5条回答
  •  囚心锁ツ
    2021-02-05 17:27

    The officially accepted answer by @Samuel was the correct answer at the time.

    But VS Code has now provided a better way to handle it.

    In short, open up your user settings and add this line of code:

        "terminal.integrated.inheritEnv": false,
    

    This prevents stomping over whatever Python environment manager you are using (eg, venv, conda, etc).

提交回复
热议问题