Skip to content

Python launcher invoked with command "py" fails to start process#99442

@kai2nenobu

Description

@kai2nenobu

Bug report

When I invoke a python launcher of version 3.11.0 with "py" command, a python launcher fails to start process.

Step to reproduce

  1. Install python 3.11.0 with py launcher for all users.

  2. Invoke "py" in command prompt.

  3. I expect to launch a python interpreter, but got a error as below

    >"py"Unable to create process using 'C:\Python311\py"': The system cannot find the file specified.
    Debug output when enable PYLAUNCHER_DEBUG
    >"py"argv0: pyversion: 3.11.0SearchInfo.originalCmdLine: "py"SearchInfo.restOfCmdLine:SearchInfo.executablePath: (null)SearchInfo.scriptFile: (null)SearchInfo.executable: py"SearchInfo.executableArgs: (null)SearchInfo.company: (null)SearchInfo.tag: (null)SearchInfo.oldStyleTag: FalseSearchInfo.lowPriorityTag: FalseSearchInfo.allowDefaults: FalseSearchInfo.allowExecutableOverride: FalseSearchInfo.windowed: FalseSearchInfo.list: FalseSearchInfo.listPaths: FalseSearchInfo.help: False -V:3.11 C:\Python311\python.exe -V:3.10 C:\Python310\python.exe -V:3.9 C:\Python39\python.exe -V:3.7 C:\Python37\python.exeenv.company: PythonCoreenv.tag: 3.11 # about to run: C:\Python311\py"Unable to create process using 'C:\Python311\py"': The system cannot find the file specified.

I think this error seems to be similar to #95285. If I invoke py or "py.exe", a python interpreter starts well as I expected.

>pyPython 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>>
>"py.exe"Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>>

In version 3.10.8, all of "py", py and "py.exe" start a python interpreter correctly.

Your environment

  • CPython versions tested on: 3.11.0
  • Operating system and architecture: Windows 10 (10.0.19045.2310)/amd64

Linked PRs

Metadata

Metadata

Assignees

Labels

OS-windowstype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions