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

Virtual env not working in new terminal #22449

Closed
mjbvz opened this issue Nov 9, 2023 · 3 comments
Closed

Virtual env not working in new terminal #22449

mjbvz opened this issue Nov 9, 2023 · 3 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@mjbvz
Copy link

mjbvz commented Nov 9, 2023

Type: Bug

Steps to reproduce:

  1. Open workspace with venv
  2. In terinal, see that the venv is working
  3. Create a new terminal.
  4. 🐛 The new terminal still says I'm in a viritual environment but no venv functions work

Image

On both the first and last lines, the $VIRTUAL_ENV environment variable isn't set

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.5
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
  • Value of the python.languageServer setting: Default

Logs: logs.txt

User Settings


languageServer: "Pylance"

Extension version: 2023.21.13121855
VS Code version: Code - Insiders 1.85.0-insider (Universal) (7771124ebd6b7f6e60da14d744961b717b73282f, 2023-11-08T05:36:07.740Z)
OS version: Darwin arm64 23.1.0
Modes:

System Info
Item Value
CPUs Apple M2 Max (12 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 4, 3, 3
Memory (System) 64.00GB (6.72GB free)
Process Argv --crash-reporter-id 0fffb5da-9cd7-46fd-9e7f-a1564e8c5fda
Screen Reader no
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
py29gd2263:30784851
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
a9j8j154:30646983
showlangstatbar:30737417
pythonfmttext:30716741
fixshowwlkth:30771523
showindicator:30805243
pythongtdpath:30726887
i26e3531:30792625
welcomedialog:30812478
pythonnosmt12:30779711
pythonidxpt:30768918
pythonnoceb:30776497
dsvsc013:30777762
dsvsc014:30777825
pythonmhint1:30859868
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30871582
pyreplss1:30879911
pythonmypyd1:30859725
pythoncet0:30859736
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
aa_t_chat:30882232

@karrtikr
Copy link

karrtikr commented Nov 9, 2023

There're two issues here, venv not activating and deactivate not working, let's tackle it one by one. Try installing https://github.com/microsoft/vscode-python/suites/18034939925/artifacts/1038232381 and do the steps to reproduce just the first issue (VIRTUAL_ENV not being set) without running any deactivate commands, and please report the logs again.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Nov 9, 2023
@mjbvz
Copy link
Author

mjbvz commented Nov 9, 2023

Not seeing today updating both vscode insiders and python insiders. Will reopen if I start hitting it again

BTW what's that build? Does it have extra logging or something that the normal insiders doesn't?

@mjbvz mjbvz closed this as completed Nov 9, 2023
@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Nov 9, 2023
@karrtikr
Copy link

karrtikr commented Nov 9, 2023

It has extra logging plus a potential fix. Looking at the logs it seems the issue was reproduced from the fact that the active editor opened was outside the workspace (.zshrc in this case). I had corrected it to handle that.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants