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

uv lock fails if the default python version doesn't match project python version #4131

Closed
konstin opened this issue Jun 7, 2024 · 2 comments · Fixed by #3945
Closed

uv lock fails if the default python version doesn't match project python version #4131

konstin opened this issue Jun 7, 2024 · 2 comments · Fixed by #3945
Labels
preview Experimental behavior

Comments

@konstin
Copy link
Member

konstin commented Jun 7, 2024

I have an environment where python is 3.12 and a project with requires-python = "==3.11.*". This makes uv lock fail:

$ cargo run -q -- lock --preview
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.11.dev0,<3.12.dev0 and warehouse==1.0.0 depends on
      Python>=3.11.dev0,<3.12.dev0, we can conclude that warehouse==1.0.0 cannot be used.
      And because only warehouse==1.0.0 is available and warehouse depends on warehouse, we can conclude that the requirements are
      unsatisfiable.

The better behavior would be uv lock finding the python 3.11 that i have in path.

@charliermarsh
Copy link
Member

I thought you solved this by making init_environment respect Requires-Python?

@konstin
Copy link
Member Author

konstin commented Jun 7, 2024

It's in #3945

@charliermarsh charliermarsh added the preview Experimental behavior label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Experimental behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants