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

Select interpreter can't list the old Pipenv virtual environments #23202

Closed
amanchaudhary-95 opened this issue Apr 8, 2024 · 6 comments
Closed
Assignees
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality needs community feedback Awaiting community feedback

Comments

@amanchaudhary-95
Copy link

amanchaudhary-95 commented Apr 8, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.88
  • OS Version: Windows 11 x64

Steps to Reproduce:

  1. Create a virtual environment with pipenv.

  2. Open vs code and execute select interpreter command, if in the same folder in which environment is created the, it shows the interpreter. Image attached:
    image

  3. After that close the VS code. Create a sub-folder or change the directory. Again, open the VS code and execute select interpreter command. Now, all the old virtual environments are not visible. Image attached:
    image

The issue is resolved after downgrading this extension to v2024.0.1

Tasks

Preview Give feedback
No tasks being tracked yet.
@vscodenpa vscodenpa added the triage-needed Needs assignment to the proper sub-team label Apr 8, 2024
@lramos15 lramos15 removed their assignment Apr 8, 2024
@lramos15 lramos15 transferred this issue from microsoft/vscode Apr 8, 2024
@karthiknadig karthiknadig changed the title Update version 1.88 - Python: Select interpreter can't list the Pipenv virtual environments Select interpreter can't list the Pipenv virtual environments Apr 9, 2024
@amanchaudhary-95 amanchaudhary-95 changed the title Select interpreter can't list the Pipenv virtual environments Select interpreter can't list the old Pipenv virtual environments Apr 13, 2024
@anthonykim1
Copy link

@amanchaudhary-95 Thanks for filing the issue.

I believe this is as designed from: #23102 as we "filter out any pipenv or poetry envs which do not belong to the current workspace."

Should we not be doing the filtering pipenv per workspace? @karthiknadig

@anthonykim1 anthonykim1 added the area-environments Features relating to handling interpreter environments label Apr 29, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Apr 29, 2024
@anthonykim1 anthonykim1 removed info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team labels Apr 29, 2024
@karthiknadig
Copy link
Member

This is expected behavior. Both pipenv and poetry expect that you create a different environment per project. They often generate a hash for environment key based on the project. This allows the tools to detect the right environment for a project. By reusing the environment in a different project can subtly break behavior.

@anthonykim1 anthonykim1 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
@amanchaudhary-95
Copy link
Author

@karthiknadig If the behaviour is as per the expectation then at least make it detect the parent environment inside the subfolders e.g. let's say I've below folder structure:

Development(Parent Folder)
|----Project1
|----Project2
|----Project3

Now, If I create a virtual environment in the "Development" folder then it should be visible in Project1, Project2 and Project3. Currently, even that is not possible. Since Pipenv doesn't allow the creation of a nested environment hence it should not be the issue.

The reason why I'm asking for this is because I've multiple ML models and while in development, these models use the same Python libraries. It is redundant and space-consuming to create a new virtual environment every time I want to develop a new model.

@karthiknadig
Copy link
Member

@amanchaudhary-95 that is a good feature request.

@karthiknadig karthiknadig reopened this May 5, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 5, 2024
@karthiknadig karthiknadig added feature-request Request for new features or functionality needs community feedback Awaiting community feedback and removed triage-needed Needs assignment to the proper sub-team labels May 5, 2024
Copy link

github-actions bot commented May 5, 2024

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@brettcannon
Copy link
Member

Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue.

@brettcannon brettcannon closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality needs community feedback Awaiting community feedback
Projects
None yet
Development

No branches or pull requests

7 participants
@brettcannon @karthiknadig @lramos15 @anthonykim1 @amanchaudhary-95 @vscodenpa and others