Skip to content

Virtualenv isn't activated in terminal properly in multi-project workspace #5863

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

Closed
akospasztor opened this issue May 31, 2019 · 1 comment
Closed

Comments

@akospasztor
Copy link

Summary

When having a workspace with multiple projects (i.e. a folder for each project, and each has different virtualenv), creating a new terminal window activates the first project's virtualenv, regardless of currently active project or explicit selection.

Expected behavior

The proper virtualenv should be activated in the newly opened terminal window for every project.

Actual behavior

The first project's virtualenv (first in the workspace folder list) is activated for every project.

Steps to reproduce

  1. Create two folders, representing two different projects.

  2. Create two virtualenvs.

  3. Add both folders to a vscode workspace, then assign the first project to a virtualenv and the second project to the other virtualenv. As shown on the following screenshots, vscode handles the virtualenv selection correctly whenever I change between projects, i.e. switching back and forth between the files of the two projects:
    step1
    When selecting a file from the second project, everything seems to be correct:
    step2

  4. Create a new terminal window, and try to select project 2.
    step3

  5. However, instead of activating the correct virtualenv (in this case, it should be demo2), the virtualenv assigned to the first project of the workspace is activated:
    step4

Environment data

  • VS Code version: Code 1.34.0 (a622c65b2c713c890fcf4fbf07cf34049d5fe758, 2019-05-15T21:59:37.030Z)
  • Extension version: 2019.5.17517 (30 May 2019)
  • OS version: Windows_NT x64 10.0.17134
  • Python version: not relevant, but tested with all combinations of version 2.7 and 3.5
  • Type of virtual environment used: virtualenv
  • Relevant/affected Python packages and their versions: n.a.
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label May 31, 2019
@DonJayamanne
Copy link

Duplicate of #3325

@DonJayamanne DonJayamanne marked this as a duplicate of #3325 Jun 3, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2019
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