linkedin / linkedin/shiv

Windows: Bug in Interpreter Path Handling

Open
#245 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
114
PR merge metrics
No merged PRs in 30d

Description

I am using shiv to create .pyz files for easy Python code execution on Windows. My usage is like this:

shiv --site-packages dist --compressed -p 'py -3.9' -o myapp.pyz -e myapp.main

For some reason, I am having issues with this now on Windows 11 with the newest python version / python launcher installed (Python Launcher for Windows Version 3.12.0):

C:\Users\Me\Downloads>myapp.pyz
Unable to create process using 'C:\Users\Me\Downloads\py -3.9 "C:\Users\Me\Downloads\myapp.pyz" ': The system cannot find the file specified.

Any help or direction with this would be greatly appreciated as I am not sure what to make of this. It seems like the path to the interpreter is prefixed with the current directory. Can I stop this from happening?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shiv CLI handling of the -p 'py -3.9' interpreter value and reproduce the command on Windows 11. Trace how that value is combined with the generated myapp.pyz path; done when the interpreter is invoked without the current directory being prefixed and the .pyz executes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.