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

Default to pipenv or poetry environments if available #19153

Closed
mkuurstra opened this issue May 15, 2022 · 7 comments · Fixed by #23102
Closed

Default to pipenv or poetry environments if available #19153

mkuurstra opened this issue May 15, 2022 · 7 comments · Fixed by #23102
Assignees
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 proposal Need to make some design decisions on-testplan Added to test plan
Milestone

Comments

@mkuurstra
Copy link

Already started a discussion about this here. It's already detected if pipenv is available and labels the correct environment as the pipenv environment, but vscode-python still defaults to / recommends the global interpreter.

interpreter selection

I would like vscode-python to default to the pipenv interpreter if it is available or have an option to alter this behaviour.

@mkuurstra mkuurstra added the feature-request Request for new features or functionality label May 15, 2022
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 15, 2022
@karthiknadig karthiknadig added the area-environments Features relating to handling interpreter environments label May 17, 2022
@karrtikr
Copy link

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.

@karrtikr
Copy link

I was working on #18263 which could also solve this issue for you. It basically means only pipenv environment created for the current workspace will be displayed in the list, so we won't have to choose or run any additional commands.

@karrtikr karrtikr added needs community feedback Awaiting community feedback and removed triage-needed Needs assignment to the proper sub-team labels May 17, 2022
@yomajo
Copy link

yomajo commented May 28, 2022

Absolutely!

I experimenting with fastapi, installed via
pipenv install fastapi

and import failed. Googled for like 10 minutes to find out, interpreter was still global.

pipenv install should trigger vscode intepreter change imo.

@karrtikr
Copy link

karrtikr commented Jun 2, 2022

Similar issue for pyenv: #1167

@brettcannon brettcannon added needs proposal Need to make some design decisions community ask Feature request that the community expressed interest in and removed needs community feedback Awaiting community feedback labels Jul 21, 2022
@brettcannon
Copy link
Member

While this issue didn't garner enough upvotes, the team thinks it's a reasonable idea, so we will keep this issue open.

@rt121212121
Copy link

rt121212121 commented Jan 23, 2023

It'd be good to get the documentation changed at least. It suggests that pipenv interpreter should work out of the box, but all my web searchings until I found this issue used fragile workarounds to force it.

https://code.visualstudio.com/docs/python/environments

image

Even a note saying that pipenv requires manually changing the detected interpreter, would be a direct pointer to getting this working. I had to garner that hint from above.

@karrtikr karrtikr added this to the March 2024 milestone Mar 18, 2024
karrtikr pushed a commit that referenced this issue Mar 21, 2024
…23102)

For #19153 

Filter out any pipenv or poetry envs which do not belong to the current
workspace.
@karrtikr
Copy link

Fix should be out in the pre-release version of the extension, use the following to try it out:

image

@karrtikr karrtikr added the on-testplan Added to test plan label Mar 22, 2024
@karrtikr karrtikr changed the title Default to pipenv environment if available Default to pipenv or poetry environments if available Mar 22, 2024
wesm pushed a commit to posit-dev/positron that referenced this issue Apr 5, 2024
…icrosoft/vscode-python#23102)

For microsoft/vscode-python#19153

Filter out any pipenv or poetry envs which do not belong to the current
workspace.
wesm pushed a commit to posit-dev/positron that referenced this issue Apr 8, 2024
…icrosoft/vscode-python#23102)

For microsoft/vscode-python#19153

Filter out any pipenv or poetry envs which do not belong to the current
workspace.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 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 community ask Feature request that the community expressed interest in feature-request Request for new features or functionality needs proposal Need to make some design decisions on-testplan Added to test plan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants