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

后端 未结 5 662
予麋鹿
予麋鹿 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条回答
  •  -上瘾入骨i
    2021-02-05 17:35

    I have been facing the exact same problem. Finally found a workaround from a forum (https://github.com/Microsoft/vscode-python/issues/4434#issuecomment-466600591)

    As long as you ADD some stuff to configuration, terminal.integrated.env.osx, the content will be appended to PATH after shell initialization(source bash_profile or zshrc). In my Mojave, I simply add following empty entry to my user configuration:

    "terminal.integrated.env.osx": {
            "PATH": ""
    }
    

    Then the $PATH will be the same as the external terminal.

提交回复
热议问题