You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Default to pipenv or poetry environments if available #19153
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.
I would like vscode-python to default to the pipenv interpreter if it is available or have an option to alter this behaviour.
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.
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.
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.
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.
Activity
karrtikr commentedon May 17, 2022
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 commentedon May 17, 2022
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.
yomajo commentedon May 28, 2022
Absolutely!
I experimenting with fastapi, installed via
pipenv install fastapiand import failed. Googled for like 10 minutes to find out, interpreter was still global.
pipenv installshould trigger vscode intepreter change imo.karrtikr commentedon Jun 2, 2022
Similar issue for pyenv: #1167
brettcannon commentedon Jul 21, 2022
While this issue didn't garner enough upvotes, the team thinks it's a reasonable idea, so we will keep this issue open.
rt121212121 commentedon 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
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.
Auto select pipenv and poetry environments created for a workspace (#…
karrtikr commentedon Mar 22, 2024
Fix should be out in the pre-release version of the extension, use the following to try it out:
[-]Default to pipenv environment if available[/-][+]Default to pipenv or poetry environments if available[/+]Auto select pipenv and poetry environments created for a workspace (m…
Auto select pipenv and poetry environments created for a workspace (m…