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

Option to select virtual env from other project #20352

Closed
kolibril13 opened this issue Dec 9, 2022 · 4 comments
Closed

Option to select virtual env from other project #20352

kolibril13 opened this issue Dec 9, 2022 · 4 comments
Labels
area-environments Features relating to handling interpreter environments community ask Feature request that the community expressed interest in feature-request Request for new features or functionality needs community feedback Awaiting community feedback

Comments

@kolibril13
Copy link

How about an option that allows you to select a virtual environment from another project? Currently, this is only possible with copy+paste of the whole interpreter path, e.g. ~/Downloads/projectA/.venv1/bin/python.
Instead, it would be nice to have an overview of all virtual environments of all projects (or maybe even the environments of the most recent used projects).
The command > Python: Select interpreter could e.g. look like this:

.venv1 (/projectA/.venv1)
.venv2 (/projectA/.venv2)
.venv3 (/projectB/.venv3)

I've made a similar issue for Jupyter kernels: microsoft/vscode-jupyter#12292
And I've mentioned this here as feedback for the Jupyter kernel picker: microsoft/vscode-jupyter#12521

Showing the folder name in projectA (maybe even with bold font) would be very useful, as the environment name .venv will be present in lots of local projects (e.g. because they were created with poetry).

Side note :

When I have a project with multiple environments in sub-folders, they show up in the menu. (This is great, and just to mention it here: that does not happen with the jupyter kernel picker, as reported in microsoft/vscode-jupyter#12521)

Question: Is there maybe a better way to list them? E.g. like .venv1, .venv2, .venv3, .venv4 . I don't see a good reason why venv2 is recommended and the others are not.

image

@kolibril13 kolibril13 added the feature-request Request for new features or functionality label Dec 9, 2022
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Dec 9, 2022
@DonJayamanne
Copy link

@karrtikr this same feature request applies to jupyter as well.
ie users would like to see virtual envs from other work space folders.

@brettcannon brettcannon added area-environments Features relating to handling interpreter environments needs community feedback Awaiting community feedback community ask Feature request that the community expressed interest in and removed triage-needed Needs assignment to the proper sub-team labels Dec 12, 2022
@brettcannon
Copy link
Member

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

You could symlink project directories over to the other workspaces you want to use it in. You can also use a tool like virtualenvwrapper which store your environments in a single, global directory so you can select from that complete list. Otherwise virtual environments are not really designed to be shared and are meant to be a per-project thing.

@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 Feb 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2023
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 community ask Feature request that the community expressed interest in feature-request Request for new features or functionality needs community feedback Awaiting community feedback
Projects
None yet
Development

No branches or pull requests

3 participants