Skip to content

on windows python.condaPath has 2 incompatible usages #270

@ccossou

Description

@ccossou

Type: Bug

Hi,
Using Python environments extension, I wanted to configure so that in powershell, the current python environment is automatically activated (powershell is my default terminal in vscode).

Without any configuration, this doesn't work and I get the error:

(base) PS C:\Users\ccossou\PycharmProjects\myenv> C:\Users\ccossou\AppData\Local\miniforge3\Scripts\conda.exe activate base
                                                                                                    
CondaError: Run 'conda init' before 'conda activate'     

To do that, I had to change the value python.condaPath to "conda". This change is taken into account after closing and restarting vscode.

After that, the conda environment is correctly activated, but on the other hand, I can't create a conda environment using the extension, because here, the path to the conda executable is expected (blabla/conda.exe).

Note that I ran "conda init powershell" in my miniforge prompt, and the powershell profile had the conda init info.

Extension version: 0.3.10972238
VS Code version: Code 1.99.0 (4437686ffebaf200fa4a6e6e67f735f3edf24ada, 2025-04-02T21:35:19.530Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) Ultra 9 185H (22 x 3072)
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) 63.45GB (38.53GB free)
Process Argv --crash-reporter-id c85b6447-e46d-43be-9367-99ebf289aa5e
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc1:31192215
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
fiia8375:31277807
pythoneinst12:31262605
bgtreat:31268568
fh1c7952:31258891
4gafe986:31271826
31787653:31262186
3e8i5726:31271747
49da9784:31264548
747dc170:31275177
g20af354:31278749

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugtriage-needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions