Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: uv help pip compile failing with error: program not found #5124

Closed
jbw-vtl opened this issue Jul 16, 2024 · 11 comments · Fixed by #5198
Closed

Bug: uv help pip compile failing with error: program not found #5124

jbw-vtl opened this issue Jul 16, 2024 · 11 comments · Fixed by #5198
Assignees
Labels
bug Something isn't working cli Related to the command line interface help wanted Contribution especially encouraged windows Specific to the Windows platform

Comments

@jbw-vtl
Copy link

jbw-vtl commented Jul 16, 2024

Running the command uv help pip compile -v is failing with

DEBUG uv 0.2.25
error: program not found

As advised by @zanieb, uv help pip compile --no-pager is working as expected.
Additionally uv pip compile --help is working aswell, however the output differs from the above command in structure & content.

uv==0.2.25
python==3.11.9
Running on Windows
@charliermarsh
Copy link
Member

Thanks!

@charliermarsh charliermarsh added bug Something isn't working cli Related to the command line interface labels Jul 16, 2024
@zanieb zanieb added help wanted Contribution especially encouraged windows Specific to the Windows platform labels Jul 16, 2024
@zanieb
Copy link
Member

zanieb commented Jul 16, 2024

This sounds like the dreaded "which finds executables differently then spawning a process on Windows". I have no idea why Cargo doesn't have this problem, as we used their implementation here. We might be able to just pass the path discovered by which to the subprocess invocation?

@jbw-vtl
Copy link
Author

jbw-vtl commented Jul 16, 2024

Running the uv help pip compile in bash on windows works (with the same versions as stated above).
Running within Powershell (tried multiple versions) and CMD both fails with the error: program not found

which is by default not available in Powershell (using get-command uv) / Cmd (using where uv)

@zanieb
Copy link
Member

zanieb commented Jul 16, 2024

Note I'm referring to the which implementation in Rust, not the executable program.

@zanieb
Copy link
Member

zanieb commented Jul 16, 2024

I've remembered that Cargo uses a custom "resolve_executables" method instead of which which is probably why they do not suffer from this problem.

@zanieb
Copy link
Member

zanieb commented Jul 18, 2024

Just to confirm, this works as intended if the pager is not found by which:

PATH="" ~/.cargo/bin/uv help pip

@charliermarsh
Copy link
Member

@zanieb - Do you think we can fix this for a release today?

@zanieb
Copy link
Member

zanieb commented Jul 18, 2024

@charliermarsh if someone with a Windows machine wants to test, it's either a trivial "pass the full path to the subprocess invocation" or turn off paging on Windows to resolve the issue immediately and explore the proper solution.

@charliermarsh
Copy link
Member

I can test it.

@charliermarsh charliermarsh self-assigned this Jul 18, 2024
charliermarsh added a commit that referenced this issue Jul 18, 2024
## Summary

Closes #5124.

## Test Plan

Ran `cargo run -- help pip compile` on my Windows machine, which failed
before but succeeds after this change.
@jbw-vtl
Copy link
Author

jbw-vtl commented Jul 22, 2024

Can confirm working well with the latest version, thanks a bunch

@charliermarsh
Copy link
Member

Awesome, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the command line interface help wanted Contribution especially encouraged windows Specific to the Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants