Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Each "New Terminal" runs pyenv shell 3.7.1 #3066

Closed
dhermes opened this issue Oct 31, 2018 · 2 comments
Closed

Each "New Terminal" runs pyenv shell 3.7.1 #3066

dhermes opened this issue Oct 31, 2018 · 2 comments

Comments

@dhermes
Copy link

dhermes commented Oct 31, 2018

Environment data

  • VS Code version:
    $ code --version
    1.28.2
    7f3ce96ff4729c91352ae6def877e59c561f4850
    x64
    
  • Extension version (available under the Extensions sidebar): 2018.9.2
  • OS and version: Ubuntu 18.04.1
  • Python version (& distribution if applicable, e.g. Anaconda):
    $ pyenv version
    3.7.1 (set by /home/dhermes/.pyenv/version)
    2.7.15 (set by /home/dhermes/.pyenv/version)
    3.6.7 (set by /home/dhermes/.pyenv/version)
    3.5.6 (set by /home/dhermes/.pyenv/version)
    3.4.9 (set by /home/dhermes/.pyenv/version)
    pypy2.7-6.0.0 (set by /home/dhermes/.pyenv/version)
    pypy3.5-6.0.0 (set by /home/dhermes/.pyenv/version)
    miniconda2-4.3.30 (set by /home/dhermes/.pyenv/version)
    miniconda3-4.3.30 (set by /home/dhermes/.pyenv/version)
    
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pyenv
  • Relevant/affected Python packages and their versions: N/A

Actual behavior

When I launch New Terminal [Ctrl+Shift+`], the newly opened terminal always runs

$ pyenv shell 3.7.1

corresponding to my default Python. But as can be seen from the output of pyenv version above, 3.7.1 is already my default Python. Calling pyenv shell 3.7.1 sets the PYENV_VERSION=3.7.1 environment variable, which results in

$ pyenv version
3.7.1 (set by PYENV_VERSION environment variable)

i.e. it has the undesired behavior of disabling my secondary pyenv environments.

Expected behavior

Nothing happens at all when a new shell is launched.

Steps to reproduce:

  1. Select ${HOME}/.pyenv/versions/.../bin/python as the default Python

Logs

N/A

@brettcannon
Copy link
Member

You can add "python.terminal.activateEnvironment": "false" to your settings to disable the activation.

@dhermes
Copy link
Author

dhermes commented Oct 31, 2018

Thanks @brettcannon, I figured there was some setting that I just wasn't finding.

ISTM that there is nothing to activate if the default pyenv environment is already the intended one.

Cheers and thanks for all your great work!

@lock lock bot locked as resolved and limited conversation to collaborators Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants