Skip to content

Integrated Terminal Not Successfully Activating pyenv-virtualenv  #24701

@rrigato

Description

@rrigato

Type: Bug

Downgrading extensions and disabling all extensions does not seem to make a difference when attempting to use a virtualenv with the integrated terminal.

steps to reproduce

  1. Install pyenv and pyenv-virtualenv plugin
brew install pyenv
brew install pyenv-virtualenv
  1. Create virtualenv
pyenv install 3.9
pyenv virtualenv 3.9 lexicon
  1. Select interpreter of virtualenv in vscode

Image

Image

  1. Open terminal and observe that the integrated terminal is using the system python instead of the selected virtualenv:

Image

python --version; which python

Image

  1. Note that manual activation sources the virtualenv
source ~/.pyenv/versions/3.9.21/envs/lexicon/bin/activate
python --version; which python 

Image

replicated bug with downgraded extensions:

Extension Author (truncated) Version
debugpy ms- 2024.12.0
python ms- 2024.20.0
vscode-pylance ms- 2024.11.3

version information from above bug

VS Code version: Code 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Darwin arm64 24.2.0
Modes:

System Info
Item Value
CPUs Apple M1 (8 x 2400)
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
webnn: disabled_off
Load (avg) 4, 17, 11
Memory (System) 8.00GB (0.08GB free)
Process Argv --crash-reporter-id 2df22562-96a1-416e-a275-cdad1d9ae4c8
Screen Reader no
VM 0%
Enabled Extensions
Extension Author (truncated) Version
debugpy ms- 2024.14.0
python ms- 2024.22.1
vscode-pylance ms- 2024.12.1
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
2f103344:31071589
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugneeds spikeLabel for issues that need investigation before they can be worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions