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

Activation of virtual environment does not work when pyenv is installed #22334

Closed
DonJayamanne opened this issue Oct 25, 2023 · 7 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@DonJayamanne
Copy link

DonJayamanne commented Oct 25, 2023

  • OS: mac, but linux should be the same
  • VS Code Insiders and latest pre-release version of Python ext
  • Install pyenv
  • Sedtup auto activation of terminals with Python environment
  • Create a .venv in your worksapce folder
  • Open a terminal either manually or using the command palette Python: Create Terminal
  • run the command which python in the terminal
  • The output is not the .venv environment, instead it points to pyenv
@DonJayamanne DonJayamanne added the bug Issue identified by VS Code Team member as probable bug label Oct 25, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 25, 2023
@karrtikr
Copy link

Unable to reproduce on codespaces, there're a lot of things that could be going on, primary thing to check is if shell integration is enabled and working.

Automatic shell integration may not work in remote scenarios: https://code.visualstudio.com/docs/terminal/shell-integration#_automatic-script-injection, manual installation maybe required.

Please provide the debug logs which can help diagnose the issue:

  • Run Developer: Set log level command
  • Select Trace
  • Run Developer: Reload Window command
  • Provide the output:
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Oct 25, 2023
@DonJayamanne
Copy link
Author

Automatic shell integration may not work in remote scenarios:

that’s complicating things
I’m not using remote, it’s pure desktop

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Oct 25, 2023
@DonJayamanne
Copy link
Author

DonJayamanne commented Oct 25, 2023

Perhaps a Linux vm or Wsl would be better
Else you just run into unknowns and issues

as you have pointed out there could be issues with remote

shell integration is enabled

yes enabled
When I disable pyenv, activation start working

@karrtikr
Copy link

I would need the logs to further diagnose the issue, unable to reproduce on either Windows or codespaces.

@DonJayamanne
Copy link
Author

DonJayamanne commented Oct 25, 2023

When you setup pyenv, does it work in codespace terminal?

@karrtikr
Copy link

Yep:
image

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Oct 25, 2023
Copy link

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

Happy Coding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants