Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Actived Python Environment only partially works #25036

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

Open
danielniccoli opened this issue May 5, 2025 · 3 comments
Open

Actived Python Environment only partially works #25036

danielniccoli opened this issue May 5, 2025 · 3 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@danielniccoli
Copy link

Type: Bug

Automatically activated environments only partially work. python.exe is found, but other tools like pip.exe (or ruff if installed) are not.

In previous version, this worked.

  1. Run > Python: Create environment...
  2. Check that .venv\Scripts\python.exe and .venv\Scripts\python.exe exist.
  3. Open the Terminal and verify the environment was loaded: Get-Command python.exe (should show you the python binary in your new venv).
  4. Run pip.exe
pip.exe: The term 'pip.exe' is not recognized as a name of a cmdlet, function, script file, or executable program.
  1. Activate environment manually: .venv\Scripts\Activate.ps1
  2. Run pip.exe again. Now it works.

VS Code version: Code 1.99.3 (17baf841131aa23349f217ca7c570c76ee87b957, 2025-04-15T23:18:46.076Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 2304)
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
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.73GB (14.76GB free)
Process Argv C:\code\GitHub\diconium\IT-IAM-mailbox-automations\README.md --crash-reporter-id c8b77264-d6e8-4b5f-95e9-cdecf57cf75e
Screen Reader no
VM 0%
Extensions (5)
Extension Author (truncated) Version
ruff cha 2025.22.0
debugpy ms- 2025.6.0
python ms- 2025.5.2025042501
vscode-pylance ms- 2025.4.102
autodocstring njp 0.6.1
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
563cc122:31253270
31787653:31262186
3e8i5726:31271747
pythonpulldiagcf:31298646
996jf627:31283433
pythonrdcb7:31296841
usemplatestapi:31297334
7bj51361:31289155
747dc170:31275177
g20af354:31278749
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004

@meganrogge meganrogge assigned karthiknadig and unassigned meganrogge May 5, 2025
@karthiknadig karthiknadig transferred this issue from microsoft/vscode May 5, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 5, 2025
@Unturned3
Copy link

Can you print your $PATH (or whatever the equivalent of this variable is on Windows), in the integrated terminal? I am experiencing a similar problem (on macOS) and I noticed there are some broken characters in the $PATH, causing the shell to fail in finding the correct python interpreter.

@SiddharthPatel45
Copy link

SiddharthPatel45 commented May 15, 2025

Not sure if this is related, but when python.terminal.activateEnvironment is active, the environment is not loaded correctly. I see some : being parsed as \x3a when I echo $PATH and other variables. This also means, when the virtual environment is active by default (using this extension) I cannot find deactivate command as one of the : in the $PATH has been replaced to \x3a.

@karthiknadig
Copy link
Member

@SiddharthPatel45 the \x3a is not caused by Python extension but is a regression in core VS Code: microsoft/vscode#248468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

5 participants