When opening a vscode terminal when the python extension is loaded, it tries to execute this:
source /Users/victor/.pyenv/shims/activate.sh
Which triggers this error:
pyenv: activate.sh command not found
The `activate.sh` command exists in these Python versions:
2.7.4
And then bluntly closes the terminal. Is there an issue with my pyenv installation here?
Context:
which python
>/Users/victor/.pyenv/shims/python
python --verison
>Python 3.7.4
- VSCode: Version: 1.41.1
- OS: macOS 10.14.6
pyenv versions
:system 2.7.14 3.4.3 3.5.4 3.6.4 3.6.6 3.6.9 * 3.7.4 (set by /Users/victor/.pyenv/version)
- Problem arises:
- only in VSCode's integrated terminal (not in other shells or terminals)
- only when the Python Extension loads the default Python interpreter (
/Users/victor/.pyenv/shims/python
) => does not occur when it is configured to load a virtualenv's Python interpreter - on all Python version I configure with
pyenv global
- except if I select a specific Python interpreter as default (
~/.pyenv/versions/3.7.4/bin/python
) in which case the terminal is opened withpyenv shell 3.7.4
(see @Brett Canon's comment)