Skip to content

conda not found despite specification of conda path. #23793

Open

Description

Type: Bug

Behaviour

This issue started suddenly. The powershell at opening of VS Code says that conda isn't recognized as the name of a cmdlet.. etc. The value of the setting that tells Python where conda is as follows:
"python.condaPath": "C:\Users\APSHANKAR\AppData\Local\anaconda3\Scripts\conda.exe"

It simply seems not to be working.

Steps to reproduce:

Reinstall Python Extension. Reopen VS Code.
Watch as the console says that conda is not found.

Diagnostic data

2024-07-11 10:01:39.019 [info] Experiment 'pythonCreateEnvOnPipInstall' is active 2024-07-11 10:01:39.019 [info] Experiment 'pythonRecommendTensorboardExt' is active 2024-07-11 10:01:39.019 [info] Experiment 'pythonTerminalEnvVarActivation' is active 2024-07-11 10:01:39.019 [info] Experiment 'pythonTestAdapter' is active 2024-07-11 10:01:39.020 [error] Reading directory to watch failed [Error: ENOENT: no such file or directory, scandir 'c:\Users\APSHANKAR\Mecatherm\MaMaTa Corporate - General\Sagar\.pixi\envs' at Object.readdirSync (node:fs:1515:3) at t.readdirSync (node:electron/js2c/node_init:2:11289) at c:\Users\APSHANKAR\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\out\client\extension.js:2:574598 at c:\Users\APSHANKAR\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\out\client\extension.js:2:574789 at Array.map () at d.initWatchers (c:\Users\APSHANKAR\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\out\client\extension.js:2:574507) at async d.ensureWatchersReady (c:\Users\APSHANKAR\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\out\client\extension.js:2:536827)] { errno: -4058, syscall: 'scandir', code: 'ENOENT', path: 'c:\\Users\\APSHANKAR\\Mecatherm\\MaMaTa Corporate - General\\Sagar\\.pixi\\envs' } 2024-07-11 10:01:39.020 [error] Dir "c:\Users\APSHANKAR\Mecatherm\MaMaTa Corporate - General\Sagar\.pixi\envs" is not watchable (directory does not exist) 2024-07-11 10:01:39.020 [info] Default formatter is set to ms-python.black-formatter for workspace c:\Users\APSHANKAR\Mecatherm\MaMaTa Corporate - General\Sagar 2024-07-11 10:01:39.020 [info] Python interpreter path: ~\AppData\Local\anaconda3\envs\CognitePy11_plotly\python.exe 2024-07-11 10:01:39.073 [info] > pyenv which python 2024-07-11 10:01:39.073 [info] cwd: ~\Mecatherm\MaMaTa Corporate - General\Sagar 2024-07-11 10:01:41.415 [info] > ~\AppData\Local\anaconda3\Scripts\conda.exe info --json 2024-07-11 10:01:41.415 [info] shell: powershell 2024-07-11 10:01:47.711 [info] Starting Pylance language server. 2024-07-11 10:01:47.925 [info] > ~\AppData\Local\anaconda3\Scripts\conda.exe info --json 2024-07-11 10:02:03.319 [info] > ~\AppData\Local\anaconda3\Scripts\conda.exe --version 2024-07-11 10:02:08.499 [info] > ~\AppData\Local\anaconda3\Scripts\conda.exe run -p ~\AppData\Local\anaconda3\envs\CognitePy11_plotly --no-capture-output python ~\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\python_files\get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2024.10.0-win32-x64/python_files/printEnvVariables.py 2024-07-11 10:02:08.499 [info] shell: powershell 2024-07-11 10:02:13.865 [warning] Got env variables but with errors Error while loading conda entry point: anaconda-cloud-auth (cannot import name 'ChannelAuthBase' from 'conda.plugins.types' (C:\Users\APSHANKAR\AppData\Local\anaconda3\Lib\site-packages\conda\plugins\types.py)) Error while loading conda entry point: anaconda-cloud-auth (cannot import name 'ChannelAuthBase' from 'conda.plugins.types' (C:\Users\APSHANKAR\AppData\Local\anaconda3\Lib\site-packages\conda\plugins\types.py)) { ALLUSERSPROFILE: 'C:\\ProgramData', APPDATA: 'C:\\Users\\APSHANKAR\\AppData\\Roaming', CHROME_CRASHPAD_PIPE_NAME: '\\\\.\\pipe\\crashpad_29632_UHAHEYTFYVGESOEN', COMMONPROGRAMFILES: 'C:\\Program Files\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files', COMMONPROGRAMW6432: 'C:\\Program Files\\Common Files', COMPUTERNAME: 'NOM525', COMSPEC: 'C:\\WINDOWS\\system32\\cmd.exe', CONDA_DEFAULT_ENV: 'CognitePy11_plotly', CONDA_EXE: 'C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\Scripts\\conda.exe', CONDA_PREFIX: 'C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\envs\\CognitePy11_plotly', CONDA_PROMPT_MODIFIER: '(CognitePy11_plotly) ', CONDA_PYTHON_EXE: 'C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\python.exe', CONDA_SHLVL: '1', DRIVERDATA: 'C:\\Windows\\System32\\Drivers\\DriverData', ELECTRON_RUN_AS_NODE: '1', FPS_BROWSER_APP_PROFILE_STRING: 'Internet Explorer', FPS_BROWSER_USER_PROFILE_STRING: 'Default', HOMEDRIVE: 'C:', HOMEPATH: '\\Users\\APSHANKAR', LOCALAPPDATA: 'C:\\Users\\APSHANKAR\\AppData\\Local', LOGONSERVER: '\\\\MECABAD02', MOZ_PLUGIN_PATH: 'C:\\Program Files (x86)\\Foxit Software\\Foxit PDF Reader\\plugins\\', NUMBER_OF_PROCESSORS: '8', ONEDRIVE: 'C:\\Users\\APSHANKAR\\OneDrive - Mecatherm', ONEDRIVECOMMERCIAL: 'C:\\Users\\APSHANKAR\\OneDrive - Mecatherm', ONEDRIVECONSUMER: 'C:\\Users\\APSHANKAR\\OneDrive', ORIGINAL_XDG_CURRENT_DESKTOP: 'undefined', OS: 'Windows_NT', PATH: 'C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\envs\\CognitePy11_plotly;C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\envs\\CognitePy11_plotly\\Library\\mingw-w64\\bin;C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\envs\\CognitePy11_plotly\\Library\\usr\\bin;C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\envs\\CognitePy11_plotly\\Library\\bin;C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\envs\\CognitePy11_plotly\\Scripts;C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\envs\\CognitePy11_plotly\\bin;C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\condabin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\WINDOWS\\System32\\OpenSSH;C:\\Program Files\\Git\\cmd;C:\\Program Files (x86)\\GitExtensions;C:\\Program Files\\dotnet;C:\\Users\\APSHANKAR\\AppData\\Local\\Microsoft\\WindowsApps;.;C:\\Users\\APSHANKAR\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files (x86)\\Nmap', PATHEXT: '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL', PROCESSOR_ARCHITECTURE: 'AMD64', PROCESSOR_IDENTIFIER: 'Intel64 Family 6 Model 140 Stepping 1, GenuineIntel', PROCESSOR_LEVEL: '6', PROCESSOR_REVISION: '8c01', PROGRAMDATA: 'C:\\ProgramData', PROGRAMFILES: 'C:\\Program Files', 'PROGRAMFILES(X86)': 'C:\\Program Files (x86)', PROGRAMW6432: 'C:\\Program Files', PROMPT: '(CognitePy11_plotly) $P$G', PSMODULEPATH: 'C:\\Users\\APSHANKAR\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules', PUBLIC: 'C:\\Users\\Public', PYTHONIOENCODING: 'utf-8', PYTHONUNBUFFERED: '1', PYTHONUTF8: '1', PYTHONWARNINGS: 'ignore', SESSIONNAME: 'Console', SNC_LIB: 'C:\\Program Files (x86)\\SAP\\SNCEncryption\\x86\\sapsncencryption.dll', SNC_LIB_64: 'C:\\Program Files (x86)\\SAP\\SNCEncryption\\x64\\sapsncencryption.dll', SSL_CERT_FILE: 'C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3\\envs\\CognitePy11_plotly\\Library\\ssl\\cacert.pem', SYSTEMDRIVE: 'C:', SYSTEMROOT: 'C:\\WINDOWS', TEMP: 'C:\\Users\\APSHAN~1\\AppData\\Local\\Temp', TMP: 'C:\\Users\\APSHAN~1\\AppData\\Local\\Temp', USERDNSDOMAIN: 'MECATHERM.LOCAL', USERDOMAIN: 'MECADOM', USERDOMAIN_ROAMINGPROFILE: 'MECADOM', USERNAME: 'APSHANKAR', USERPROFILE: 'C:\\Users\\APSHANKAR', VSCODE_AMD_ENTRYPOINT: 'vs/workbench/api/node/extensionHostProcess', VSCODE_CODE_CACHE_PATH: 'C:\\Users\\APSHANKAR\\AppData\\Roaming\\Code\\CachedData\\ea1445cc7016315d0f5728f8e8b12a45dc0a7286', VSCODE_CRASH_REPORTER_PROCESS_TYPE: 'extensionHost', VSCODE_CWD: 'C:\\Users\\APSHANKAR\\AppData\\Local\\Programs\\Microsoft VS Code', VSCODE_HANDLES_UNCAUGHT_ERRORS: 'true', VSCODE_IPC_HOOK: '\\\\.\\pipe\\d3bfd3a7-1.91.0-main-sock', VSCODE_L10N_BUNDLE_LOCATION: '', VSCODE_NLS_CONFIG: '{"locale":"en-us","osLocale":"fr-fr","availableLanguages":{},"_languagePackSupport":true}', VSCODE_PID: '29632', WINDIR: 'C:\\WINDOWS', ZES_ENABLE_SYSMAN: '1', _CONDA_OLD_CHCP: '850', __CONDA_OPENSLL_CERT_FILE_SET: '"1"', __TELEMETRY_CLIENT_ID: '29d795f5-a365-4652-a0cb-4dd6bc855fdb', CONDA_ROOT: 'C:\\Users\\APSHANKAR\\AppData\\Local\\anaconda3' } 2024-07-11 10:02:13.894 [info] > python ~/.vscode/extensions/ms-python.python-2024.10.0-win32-x64/python_files/printEnvVariables.py 2024-07-11 10:02:13.894 [info] shell: powershell 2024-07-11 10:02:14.761 [info] Setting environment variable CONDA_DEFAULT_ENV in collection to CognitePy11_plotly {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable CONDA_EXE in collection to C:\Users\APSHANKAR\AppData\Local\anaconda3\Scripts\conda.exe {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable CONDA_PREFIX in collection to C:\Users\APSHANKAR\AppData\Local\anaconda3\envs\CognitePy11_plotly {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable CONDA_PROMPT_MODIFIER in collection to (CognitePy11_plotly) {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable CONDA_PYTHON_EXE in collection to C:\Users\APSHANKAR\AppData\Local\anaconda3\python.exe {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable CONDA_SHLVL in collection to 1 {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Prepending environment variable PATH in collection to C:\Users\APSHANKAR\AppData\Local\anaconda3\envs\CognitePy11_plotly;C:\Users\APSHANKAR\AppData\Local\anaconda3\envs\CognitePy11_plotly\Library\mingw-w64\bin;C:\Users\APSHANKAR\AppData\Local\anaconda3\envs\CognitePy11_plotly\Library\usr\bin;C:\Users\APSHANKAR\AppData\Local\anaconda3\envs\CognitePy11_plotly\Library\bin;C:\Users\APSHANKAR\AppData\Local\anaconda3\envs\CognitePy11_plotly\Scripts;C:\Users\APSHANKAR\AppData\Local\anaconda3\envs\CognitePy11_plotly\bin;C:\Users\APSHANKAR\AppData\Local\anaconda3\condabin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files (x86)\GitExtensions;C:\Program Files\dotnet;C:\Users\APSHANKAR\AppData\Local\Microsoft\WindowsApps;.;C:\Users\APSHANKAR\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\Nmap; {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable PATHEXT in collection to .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable PROMPT in collection to (CognitePy11_plotly) $P$G {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable PSMODULEPATH in collection to C:\Users\APSHANKAR\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable PYTHONIOENCODING in collection to utf-8 {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable PYTHONUNBUFFERED in collection to 1 {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable SSL_CERT_FILE in collection to C:\Users\APSHANKAR\AppData\Local\anaconda3\envs\CognitePy11_plotly\Library\ssl\cacert.pem {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable _CONDA_OLD_CHCP in collection to 850 {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable __CONDA_OPENSLL_CERT_FILE_SET in collection to "1" {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.761 [info] Setting environment variable CONDA_ROOT in collection to C:\Users\APSHANKAR\AppData\Local\anaconda3 {"applyAtShellIntegration":true,"applyAtProcessCreation":true} 2024-07-11 10:02:14.762 [info] Send text to terminal: & python c:\Users\APSHANKAR\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\python_files\printEnvVariablesToFile.py c:\Users\APSHANKAR\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\python_files\deactivate\powershell\envVars.txt

No code involved

Behaviour

XXX

Steps to reproduce:

Open VS Code.

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

No code. conda not found at startup. 

Extension version: 2024.10.0
VS Code version: Code 1.91.0 (ea1445cc7016315d0f5728f8e8b12a45dc0a7286, 2024-07-01T18:52:22.949Z)
OS version: Windows_NT x64 10.0.19045
Modes:

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


condaPath: "<placeholder>"

languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
Amazon Q amazonwebservices.amazon-q-vscode 1.12.0
AWS Toolkit amazonwebservices.aws-toolkit-vscode 3.13.0
Docs View bierner.docs-view 0.1.0
JavaScript Debugger ms-vscode.js-debug 1.91.0
JavaScript Debugger Companion Extension ms-vscode.js-debug-companion 1.1.2
Jupyter ms-toolsai.jupyter 2024.6.0
Jupyter Cell Tags ms-toolsai.vscode-jupyter-cell-tags 0.1.9
Jupyter Keymap ms-toolsai.jupyter-keymap 1.1.2
Jupyter Notebook Renderers ms-toolsai.jupyter-renderers 1.0.18
Jupyter Slide Show ms-toolsai.vscode-jupyter-slideshow 0.1.6
Pylance ms-python.vscode-pylance 2024.7.1
Python ms-python.python 2024.10.0
Python Debugger ms-python.debugpy 2024.8.0
Rainbow CSV mechatroner.rainbow-csv 3.12.0
Remote - SSH ms-vscode-remote.remote-ssh 0.112.0
Remote - SSH: Editing Configuration Files ms-vscode-remote.remote-ssh-edit 0.86.0
Remote Explorer ms-vscode.remote-explorer 0.4.3
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.9
vscode-pdf tomoki1207.pdf 1.2.2
System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (8 x 2419)
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
Load (avg) undefined
Memory (System) 15.79GB (2.86GB free)
Process Argv --crash-reporter-id 0fdda599-54ce-4233-bbb4-ff6dc89ed092
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
chatpanelc:31048052
dsvsc021:30996838
945dj816:31013170
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
2f103344:31071589
legacy_priority:31082724
pythonrstrctxtcf:31093870
4930e709:31092288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environments

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions