Skip to content

Poetry virtualenv not activated properly with zsh on macOS #22901

Description

@pquadri

Type: Bug

Behaviour

Expected vs. Actual

The shell loads a virtualenv with the correct PATH variables

Steps to reproduce:

  1. set up .zshrc file that overrides the default PATH
  2. open VsCode with a virtualenv
  3. the PATH is overriden by the .zshrc file and you have to manually activate the environment to fix it

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.9
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Poetry
  • Value of the python.languageServer setting: Pylance
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Extension log: here

User Settings


venvFolders: "<placeholder>"

languageServer: "Pylance"

Extension version: 2024.0.1
VS Code version: Code 1.86.1 (Universal) (31c37ee8f63491495ac49e43b8544550fbae4533, 2024-02-07T09:09:01.236Z)
OS version: Darwin arm64 23.3.0
Modes:

System Info
Item Value
CPUs Apple M2 Pro (10 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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 1, 3, 4
Memory (System) 32.00GB (1.41GB free)
Process Argv --crash-reporter-id 0993b21c-ed0f-4a13-81f3-8f189d042a2f
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:30961340
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
b1063948:30958189
a89i1917:30961429
3ef8e399:30962115

Metadata

Metadata

Assignees

Labels

experimentingFeature is part of an experimenttriage-neededNeeds assignment to the proper sub-team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions