Closed
Description
Environment data
- VS Code version: 1.25.0
- Extension version (available under the Extensions sidebar): 2018.6.0
- OS and version: Arch Linux (up-to-date)
- Python version (& distribution if applicable, e.g. Anaconda): 3.6.6 (pyenv)
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
Actual behavior
Assuming pyenv is installed in a non-default dir.
Python interpreters installed with pyenv are not listed when running the "Python: Select Interpreter"
command.
Expected behavior
Assuming pyenv is installed in a non-default dir.
Python interpreters installed with pyenv are listed when running the "Python: Select Interpreter"
command.
Steps to reproduce:
- Properly install pyenv to a non-default location, i.e. a directory different from
~/.pyenv
.
This includes setting thePYENV_ROOT
environment variable to the chosen directory. - Install one or more Python versions using pyenv. Example:
pyenv install 3.6.6
. - Within vscode run the
"Python: Select Interpreter"
command. - All Python versions/interpreters installed in step (2) are not included in the list shown.
Workaround
Create a symlink in the home directory pointing to the actual pyenv dir.
ln -s /the/actual/path/to/pyenv ~/.pyenv
After doing so, all Python versions installed with pyenv are listed in the select interpreter area.
Proposed Solution
- Do not hardcode the pyenv root dir to
~/.pyenv
. - Read its location from the
PYENV_ROOT
environment variable. - (Maybe) use
~/.pyenv
as fallback value.