-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
conda not found despite specification of conda path. #23793
Comments
Hello @sagar-aps-MaMaTa apologies for late response and thank you for filing this issue. I'm assuming you didn't have similar problems with other types of virtual environment? Also can you try disabling 'pythonTerminalEnvVarActivation' experiment via adding line of
in your settings.json? Would love to further track where this is actually coming from. |
Hello Anthony,
Thanks a lot for that, it solved my issue! I can aid you if you need me to test anything else in that regard.
You are right, I didn't have any other virtual env related problems because I only used conda on this machine.
Warm regards,
Sagar APSHANKAR
Data Scientist
***@***.******@***.***>
23 Avenue de Neuilly, 75014 Paris
***@***.***
From: Anthony Kim ***@***.***>
Sent: Monday, July 22, 2024 5:48 AM
To: microsoft/vscode-python ***@***.***>
Cc: APSHANKAR Sagar ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/vscode-python] conda not found despite specification of conda path. (Issue #23793)
Hello @sagar-aps-MaMaTa<https://github.com/sagar-aps-MaMaTa> apologies for late response and thank you for filing this issue. I'm assuming you didn't have similar problems with other types of virtual environment?
Also can you try disabling 'pythonTerminalEnvVarActivation' experiment via adding line of
"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"],
in your settings.json?
Would love to further track where this is actually coming from.
-
Reply to this email directly, view it on GitHub<#23793 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCZ23S5WJ4TVKSVBLEFXCBLZNR6HBAVCNFSM6AAAAABKWOIPHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRHE4DMOJUGU>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
@sagar-aps-MaMaTa Glad that worked out! In your output panel that you provided, are: everything that you desired for us to apply for you? My second guess would be:
from your output panel. |
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
Behaviour
XXX
Steps to reproduce:
Open VS Code.
Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)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.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
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
A/B Experiments
The text was updated successfully, but these errors were encountered: