Skip to content

ERROR conda.cli.main_run:execute(47). Could not load py2 as interpreter #21002

Closed
@PigeonXiong

Description

@PigeonXiong

Type: Bug

Behaviour

Expected vs. Actual

The choice of python interpreter only pops py3 envs, no py2 envs.
When manually choose the py2 env executable, error occurs.

Steps to reproduce:

  1. Use conda to create virtual env with py2.7
  2. Load the executable as python interpreter
  • Python version (& distribution if applicable, e.g. Anaconda): 2.7.18
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

[ERROR 2023-3-5 15:42:56.177]: [Error: Command failed: /home/local/ASUAD/yxiong42/Software/anaconda3/bin/conda run -n DeepRec --no-capture-output python -I /home/local/ASUAD/yxiong42/.vscode/extensions/ms-python.python-2023.6.0/pythonFiles/get_output_via_markers.py /home/local/ASUAD/yxiong42/.vscode/extensions/ms-python.python-2023.6.0/pythonFiles/interpreterInfo.py
Unknown option: -I
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try python -h' for more information. ERROR conda.cli.main_run:execute(47): conda run python -I /home/local/ASUAD/yxiong42/.vscode/extensions/ms-python.python-2023.6.0/pythonFiles/get_output_via_markers.py /home/local/ASUAD/yxiong42/.vscode/extensions/ms-python.python-2023.6.0/pythonFiles/interpreterInfo.py` failed. (See above for error)

at ChildProcess.exithandler (node:child_process:408:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Socket.<anonymous> (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe.<anonymous> (node:net:687:12)] {

killed: false,
code: 2,
signal: null,
cmd: '/home/local/ASUAD/yxiong42/Software/anaconda3/bin/conda run -n DeepRec --no-capture-output python -I /home/local/ASUAD/yxiong42/.vscode/extensions/ms-python.python-2023.6.0/pythonFiles/get_output_via_markers.py /home/local/ASUAD/yxiong42/.vscode/extensions/ms-python.python-2023.6.0/pythonFiles/interpreterInfo.py'
}
Starting Pylance language server.

User Settings


condaPath: "<placeholder>"

languageServer: "Pylance"

terminal
• activateEnvironment: false

Extension version: 2023.6.0
VS Code version: Code 1.77.1 (b7886d7461186a5eac768481578c1d7ca80e2d21, 2023-04-04T23:20:37.202Z)
OS version: Linux x64 5.15.0-69-generic
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Xeon(R) W-2125 CPU @ 4.00GHz (8 x 4000)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 0, 1, 0
Memory (System) 62.49GB (58.73GB free)
Process Argv --unity-launch --crash-reporter-id d302797c-48b2-4d9a-9bb7-da08829ceb50
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vscaac:30438847
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
nodejswelcome1:30587005
2e4cg342:30602488
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
2i9eh265:30646982
vsccsb:30705552
pythonb192:30669360
defaultazurewalk:30687958
pythonms35:30701012

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-neededNeeds assignment to the proper sub-team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions