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

poetry env list does not list in-project environment even though it is currently activated #3939

Closed
3 tasks done
karrtikr opened this issue Apr 13, 2021 · 2 comments · Fixed by #6979
Closed
3 tasks done
Labels
area/cli Related to the command line area/venv Related to virtualenv management kind/bug Something isn't working as expected status/confirmed Issue is reproduced and confirmed status/triage This issue needs to be triaged

Comments

@karrtikr
Copy link

karrtikr commented Apr 13, 2021

Hi VSCode Python extension dev here 👋

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

Unless the virtualenvs.in-project is explicitly set to true, poetry env list does not display local .venv named environment. If setting is not set to true, poetry will use the virtualenv from the .venv directory when one is available as stated in the docs. In that case I would also expect poetry env list to contain the active poetry environment, which is the local .venv.

So it seems that our extension cannot rely on poetry env list to discover all poetry environments microsoft/vscode-python#8372 for a project atm.

@karrtikr karrtikr added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Apr 13, 2021
@StigKorsnes
Copy link

I have it explicitly set to true (AppData/Roaming/pypoetry/config.toml). Further to the mentioned issue, the select interpreter command does not display the environment even if activated, and same goes for jupyter notebooks (Select Kernel). Opening up a new blank notebook, it displays the activated venv under the kernel field, but is lost once you save. However, if you open up a new blank workbook and run something before you save, it remembers. VsCode 1.56.0

@finswimmer finswimmer added area/config Related to configuration management area/venv Related to virtualenv management area/cli Related to the command line status/confirmed Issue is reproduced and confirmed and removed area/config Related to configuration management labels Oct 22, 2022
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/cli Related to the command line area/venv Related to virtualenv management kind/bug Something isn't working as expected status/confirmed Issue is reproduced and confirmed status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants