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

Appearance settings

Python 3.11.0b4 - py launcher fails when running a script with a shebang line #94772

Copy link
Copy link

Description

@pfmoore
Issue body actions

Bug report

When running a script with a "shebang" line, the py.exe launcher in Python 3.11.0b4 fails with an error:

To reproduce, create the following script as x.py:

#!/usr/bin/env python
import sys
print(sys.version)
print(sys.executable)

Run the script using py.exe built from a 3.11.0b4 checkout using build.bat:

❯ .\amd64\py.exe .\x.py
 .\x.py': The system cannot find the file specified.ata\Local\Programs\Python\Python310\python.exe

Note the truncated python executable name. This appears to be related to the use of CRLF line endings in the file - if I switch to LF line endings, I get

❯ .\amd64\py.exe .\x.py
Unable to create process using 'C:\Users\Gustav\AppData\Local\Programs\Python\Python310\python.exe
 .\x.py': The system cannot find the file specified.

Your environment

  • Launcher from 3.11.0b4, but the active Python version is 3.10.3.
  • Operating system and architecture: Windows 11, 64-bit.
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    Status
    Done
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.