Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python 3.11 launcher fails with "Unable to create process" #95285

Closed
Assignees
zooba
Labels
@pfmoore

Description

@pfmoore

Bug report

When running apip.pyz file with thepy.exe launcher (itself launched from a Rust program), the command fails with the error:

Unable to create process using 'C:\Users\Gustav\AppData\Local\Programs\Python\Python311\"py C:\Users\Gustav\.local\apps\pip.pyz --version': The system cannot find the file specified.

Unfortunately, I haven't been able to isolate a fully reproducible test case so far. However, I have set$env:PYLAUNCHER_DEBUG=1 and the output of the failing command is

❯ pip --versionargv0: py.exeversion: 3.11.0b5# Read 4096 bytes from C:\Users\Gustav\.local\apps\pip.pyz to find shebang lineShebang: /usr/bin/env python# Reading from C:\Users\Gustav\AppData\Local\py.ini for commands/python# Did not find file C:\Users\Gustav\AppData\Local\py.ini# Reading from C:\WINDOWS\py.ini for commands/python# Did not find file C:\WINDOWS\py.ini# Treating shebang command 'python' as 'py'SearchInfo.originalCmdLine: "py.exe" C:\Users\Gustav\.local\apps\pip.pyz --versionSearchInfo.restOfCmdLine:  C:\Users\Gustav\.local\apps\pip.pyz --versionSearchInfo.executablePath: (null)SearchInfo.scriptFile: C:\Users\Gustav\.local\apps\pip.pyzSearchInfo.executable: "pySearchInfo.executableArgs:SearchInfo.company: (null)SearchInfo.tag: (empty)SearchInfo.oldStyleTag: TrueSearchInfo.lowPriorityTag: FalseSearchInfo.exclude32Bit: FalseSearchInfo.only32Bit: FalseSearchInfo.allowDefaults: FalseSearchInfo.allowExecutableOverride: FalseSearchInfo.windowed: FalseSearchInfo.list: FalseSearchInfo.listPaths: FalseSearchInfo.help: False -V:3.11          C:\Users\Gustav\AppData\Local\Programs\Python\Python311\python.exe -V:3.10          C:\Users\Gustav\AppData\Local\Programs\Python\Python310\python.exe -V:3.9           C:\Users\Gustav\AppData\Local\Programs\Python\Python39\python.exe -V:3.8           C:\Users\Gustav\AppData\Local\Programs\Python\Python38\python.exeenv.company: PythonCoreenv.tag: 3.11# about to run: C:\Users\Gustav\AppData\Local\Programs\Python\Python311\"py C:\Users\Gustav\.local\apps\pip.pyz --versionUnable to create process using 'C:\Users\Gustav\AppData\Local\Programs\Python\Python311\"py C:\Users\Gustav\.local\apps\pip.pyz --version': The system cannot find the file specified.

The key issue seems to be

SearchInfo.executable: "py

(note the unbalanced quotes) which appears to be a result of incorrectly parsing the following:

SearchInfo.originalCmdLine: "py.exe" C:\Users\Gustav\.local\apps\pip.pyz --version

I can create the same debug output using the internal_winapi.CreateProcess function:

_winapi.CreateProcess("C:/Windows/py.exe", '"py.exe" -0', None, None, 0, 0, None, None, 0)

So the problem appears to be when the command line passed toCreateProcess contains a double quoted but relative filename.

Your environment

  • Python and launcher from 3.11.0b5.
  • Operating system and architecture: Windows 11, 64-bit.

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp