Pyenv is not detected when the VS Code editor is installed via the Snap installer in Ubuntu 18.x, and PYENV_ROOT is not set to the standard ~/.pyenv path.
Note: If the PYENV_ROOT is set to a directory such as /opt/python/pyenv then setting the "python.venvFolders": [ "../../opt/python/pyenv" ] results in an ENOENT error when loading the extension.
Environment data
- VS Code version: 13.0.2
- Extension version (available under the Extensions sidebar): 2019.1.0 (found during bugbash)
- OS and version: Ubuntu 18.10
- Python version (& distribution if applicable, e.g. Anaconda): pyenv, all
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
- Relevant/affected Python packages and their versions: N/A
Expected behaviour
VS Code Python extension can detect all available versions in the pyenv install. All versions available to the user when they issue the pyenv versions command.
Actual behaviour
No python versions installed via pyenv are shown.
Steps to reproduce:
- Set a non-standard root to PYENV_ROOT before running the installer script (such as
/opt/python/pyenv).
export PYENV_ROOT=/opt/python/pyenv
- Install
pyenv according to the instructions in the pyenv-installer README.
- Install at least one version of Python using
pyenv install.
- Ensure pyenv can see the installed version:
- Install VS Code using the
Installer software that ships with Ubuntu. This is the snap installation.
- Open VS Code and install the Python extension.
- Open a workspace that contains a Python file, and wait until the extension loads.
- Click on the interpreter in the status bar and observe the Python interpreters that are available.
Pyenv is not detected when the VS Code editor is installed via the Snap installer in Ubuntu 18.x, and PYENV_ROOT is not set to the standard ~/.pyenv path.
Note: If the PYENV_ROOT is set to a directory such as
/opt/python/pyenvthen setting the"python.venvFolders": [ "../../opt/python/pyenv" ]results in an ENOENT error when loading the extension.Environment data
Expected behaviour
VS Code Python extension can detect all available versions in the
pyenvinstall. All versions available to the user when they issue thepyenv versionscommand.Actual behaviour
No python versions installed via
pyenvare shown.Steps to reproduce:
/opt/python/pyenv).export PYENV_ROOT=/opt/python/pyenvpyenvaccording to the instructions in the pyenv-installer README.pyenv install.pyenv install 3.7-devpyenv versionsInstallersoftware that ships with Ubuntu. This is thesnapinstallation.