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

Still get error running uv pip compile with --python-version specified when Python 2 is on the PATH #3579

Closed
notatallshaw-gts opened this issue May 14, 2024 · 4 comments · Fixed by #3580

Comments

@notatallshaw-gts
Copy link

notatallshaw-gts commented May 14, 2024

This is a follow up to #3474 that was closed by #3476

I am still getting the same error:

$ python -V
Python 3.11.2

$ uv self update
info: Checking for updates...
success: Upgraded `uv` to v0.1.43! https://github.com/astral-sh/uv/releases/tag/0.1.43

$ uv -V
uv 0.1.43

$ uv cache clean
Clearing cache at: /scratch/.cache/uv
Removed 31527 files (1.0GiB)

$ uv pip compile --python-version 3.10.6  -c base-constraints.txt temp-requirements.txt
error: Querying Python at `/usr/bin/python` failed with status exit status: 2 with exit status: 2
--- stdout:

--- stderr:
Unknown option: -I
usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
---

$ /usr/bin/python -V
Python 2.7.15
@charliermarsh
Copy link
Member

It's because usage: /usr/bin/python [option], we're matching against usage: python [option]`. I can fix it, but that's why it worked in my case but not yours.

@notatallshaw-gts
Copy link
Author

Thanks again for your quick fix!

I'll keep reporting issues as long as you don't mind supporting quirky edge cases old Linux distros (Fedora 29) can produce.

@charliermarsh
Copy link
Member

Out now in v0.1.45. Please report if you're still running into problems, always welcome!

@notatallshaw-gts
Copy link
Author

Thanks, I am now able to get uv commands to run under this scenario!

I have found a very curious difference between the output of pip and uv, I am investigating now to see if it's a bug in one or the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants