microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.33k stars 1.19k forks source link

The default Python interpreter failed to load when opening vscode for the first time #23622

Open Lemonxxoo opened 5 months ago

Lemonxxoo commented 5 months ago

Environment data

Expected behavior

 Can search for the Python interpreter set in the environment variable, instead of requiring me to manually specify it every time I open it 

Actual behavior

 XXX 

Logs



2024-06-14 16:22:11.249 [info] 试验“pythonCreateEnvOnPipInstall”处于活动状态
2024-06-14 16:22:11.249 [info] 试验“pythonRecommendTensorboardExt”处于活动状态
2024-06-14 16:22:11.249 [info] 试验“pythonTerminalEnvVarActivation”处于活动状态
2024-06-14 16:22:11.249 [info] 试验“pythonTestAdapter”处于活动状态
2024-06-14 16:22:11.249 [info] Default formatter is set to null for workspace d:\Code
2024-06-14 16:22:11.260 [info] > -I ~\.vscode\extensions\ms-python.python-2024.8.1\python_files\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2024.8.1\python_files\interpreterInfo.py
2024-06-14 16:22:11.273 [error] [Error: Command failed: -I c:\Users\admin\.vscode\extensions\ms-python.python-2024.8.1\python_files\get_output_via_markers.py c:\Users\admin\.vscode\extensions\ms-python.python-2024.8.1\python_files\interpreterInfo.py
'-I' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

at ChildProcess.exithandler (node:child_process:423:12)
at ChildProcess.emit (node:events:526:35)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)] {
code: 1,
killed: false,
signal: null,
cmd: '-I c:\\Users\\admin\\.vscode\\extensions\\ms-python.python-2024.8.1\\python_files\\get_output_via_markers.py c:\\Users\\admin\\.vscode\\extensions\\ms-python.python-2024.8.1\\python_files\\interpreterInfo.py'
}
2024-06-14 16:22:11.412 [info] > pyenv which python
2024-06-14 16:22:11.412 [info] cwd: .
2024-06-14 16:22:13.290 [info] > -I ~\.vscode\extensions\ms-python.python-2024.8.1\python_files\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2024.8.1\python_files\interpreterInfo.py
2024-06-14 16:22:13.304 [error] [Error: Command failed: -I c:\Users\admin\.vscode\extensions\ms-python.python-2024.8.1\python_files\get_output_via_markers.py c:\Users\admin\.vscode\extensions\ms-python.python-2024.8.1\python_files\interpreterInfo.py
'-I' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

at ChildProcess.exithandler (node:child_process:423:12)
at ChildProcess.emit (node:events:526:35)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)] {
code: 1,
killed: false,
signal: null,
cmd: '-I c:\\Users\\admin\\.vscode\\extensions\\ms-python.python-2024.8.1\\python_files\\get_output_via_markers.py c:\\Users\\admin\\.vscode\\extensions\\ms-python.python-2024.8.1\\python_files\\interpreterInfo.py'
}
2024-06-14 16:22:14.168 [info] 正在启动 Pylance 语言服务器。
2024-06-14 16:22:14.180 [info] > D:/ -c "import sys;print(sys.executable)"



rchiodo commented 5 months ago

Thanks for the issue. This is actually handled by the Python extension, transferring it there.