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

Error when installing my project with path = "." in [tool.pixi.pypi-dependencies] on Windows (works fine on mac) #2656

Open
2 tasks done
arthursw opened this issue Dec 5, 2024 · 5 comments

Comments

@arthursw
Copy link

arthursw commented Dec 5, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Run pixi shell (with pixi 0.39.0) on Windows with the following pyproject.toml

[project]
name = "joe"
version = "0.3.9"
requires-python = "==3.10.8"

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64"]

[tool.pixi.pypi-dependencies]
joe = { path = ".", editable = true }

Issue description

I get the following error when installing the above project on Windows :

WARN win-arm64 is not supported by the pixi.toml, falling back to win-64 (emulation)
  × failed to solve the pypi requirements of 'default' 'win-64'                                                                                                                   
  ├─▶ failed to resolve pypi dependencies                                                                                                                                         
  ╰─▶ Because the requested Python version (==3.10.*) does not satisfy Python==3.10.8 and joe==0.3.9 depends on Python==3.10.8, we can conclude that joe==0.3.9 cannot be used.   
      And because only joe==0.3.9 is available and you require joe, we can conclude that your requirements are unsatisfiable.                                                     

      hint: The `requires-python` value (==3.10.*) includes Python versions that are not supported by your dependencies (e.g., joe==0.3.9 only supports ==3.10.8). Consider       
      using a more restrictive `requires-python` value (like ==3.10.8).

I tried on Windows 10 and 11. I don't have the problem on OS X (just add "osx" in platforms).

Expected behavior

It should be able to install my project.

@arthursw
Copy link
Author

arthursw commented Dec 12, 2024

When I remove joe = { path = ".", editable = true } from [tool.pixi.pypi-dependencies], pixi manages to install the project on Windows:

[project]
name = "joe"
version = "0.3.9"
requires-python = "==3.10.8"

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64"]

Any idea why?

@arthursw arthursw changed the title Pixi can create my environment on Mac but not on Windows 10 Error when installing my project in editable mode on Windows 10 (works fine on mac) Dec 13, 2024
@arthursw arthursw changed the title Error when installing my project in editable mode on Windows 10 (works fine on mac) Error when installing my project in editable mode on Windows (works fine on mac) Dec 13, 2024
@arthursw
Copy link
Author

Actually, it also works when I keep editable = true, like in the following:

[project]
name = "joe"
version = "0.3.9"
requires-python = "==3.10.8"

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64"]

[tool.pixi.pypi-dependencies]
joe = { editable = true }

So the problem comes from path = ".".

Any idea why?

@arthursw arthursw changed the title Error when installing my project in editable mode on Windows (works fine on mac) Error when installing my project with path = "." in [tool.pixi.pypi-dependencies] on Windows (works fine on mac) Dec 13, 2024
@ruben-arts
Copy link
Contributor

This line seems weird to me:

Python version (==3.10.*) does not satisfy Python==3.10.8

It works when I make the requires-python = "==3.10.*", this looks like a bug. @tdejager I can't find a reason why it would error on this, also not in the uv code. Do you have any idea?

@tdejager
Copy link
Contributor

tdejager commented Dec 13, 2024

Yeah, so it apparently has to do with the Python requirment we are setting for the solver

We specifically set it to a 3.10.* version in this case, which might select a different version then the constraint on the patch version. We could try making this requirement as narrow as possible, and see if that works.

This problems also occurs on macOS when I've tested it.

@arthursw
Copy link
Author

Thanks for testing 👍
Strange, on my osx-arm64 I could install the project successfully with pixi 0.26.1.

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

No branches or pull requests

3 participants