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

Pixi has trouble installing mlx / improve error message for no matching wheels based on macOS version #562

Closed
2 tasks done
rahuldave opened this issue Dec 11, 2023 · 8 comments
Labels
✨ enhancement Feature request

Comments

@rahuldave
Copy link

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

pixi init mlx
cd mlx
pixi add python=3.10
pixi add --pypi mlx
(mlx) ➜  mlx pixi add --pypi mlx
  × The following packages are incompatible
  │ |-- mlx * cannot be installed because there are no viable options:
  │     |-- mlx 0.0.4 is excluded because none of the artifacts are compatible
  │ with the Python interpreter or glibc version
  │     |-- mlx 0.0.3 is excluded because none of the artifacts are compatible
  │ with the Python interpreter or glibc version
  │     |-- mlx 0.0.2 is excluded because none of the artifacts are compatible
  │ with the Python interpreter or glibc version
  │     |-- mlx 0.0.2.dev20231130 is excluded because prereleases are not
  │ allowed

Issue description

mlx is the new machine learning library from Apple. It comes with wheels.

in pixi shell pip install mlx suceeds with pixi's python 3.10. mlx can then be imported.

Expected behavior

The installation shouyld work, i think?

@rahuldave rahuldave added the 🐞 bug Something isn't working label Dec 11, 2023
@ruben-arts
Copy link
Contributor

Its hard to test for me as it is only available for osx-arm64. Maybe @wolfv or @tdejager could debug why this doesn't work.

@wolfv
Copy link
Member

wolfv commented Dec 12, 2023

I just checked and I get a similar error message. With rip itself it works, though.

I also think the glibc error message is a bit misleading since that doesn't really make sense on osx ...

@tdejager
Copy link
Contributor

Yeah, so I tested with the master branch of rip merged into pixi and I'm running into the same issue. Even though it works with rip directly. We will need to investigate further, thanks for the report!

@tdejager
Copy link
Contributor

So it seems it cannot select the correct version because of the WheelTags that are being passed to the dependency resolution algorithm. Will have some more info later :)

@wolfv
Copy link
Member

wolfv commented Dec 14, 2023

Actually, I just debugged this a little bit and the problem lies in our conservative macOS version choosing. We select an old macOS version but the mlx wheels are only compatible with more recent versions.

If you add the following to your toml:

[system-requirements]
macos = "14.0"

It will start to work.

We will definitely have to make the error message better and give actionable advice.

@wolfv wolfv changed the title Pixi has trouble installing mlx Pixi has trouble installing mlx / improve error message for no matching wheels based on macOS version Dec 14, 2023
@ruben-arts ruben-arts added ✨ enhancement Feature request and removed 🐞 bug Something isn't working labels Dec 14, 2023
@rahuldave
Copy link
Author

rahuldave commented Dec 14, 2023

Super debugging! Thank you folks!! (Just to confirm it all works here, i just put 13.1 instead of 14 because thats what i am on..)

@tdejager
Copy link
Contributor

tdejager commented Dec 14, 2023

Thanks! We were already discussing making the error clearer, I mean even we had to dig into the code 😅 Alright if we close this? We could make a seperate issue if you like with regards to the error.

@rahuldave
Copy link
Author

Yes, totally! Happy mlx+pixi user here!

rgommers added a commit to rgommers/pixi that referenced this issue Aug 8, 2024
The example as it was would not solve, it ends with a fairly
obscure error:

```
  × failed to solve the conda requirements of 'mlx' 'osx-arm64'
  ╰─▶ Cannot solve the request because of: mlx >=0.5.0,<0.6.0 cannot be installed because there are no viable options:
      └─ mlx 0.5.0 | 0.5.0 | 0.5.0 | 0.5.0 | 0.5.0 | 0.5.1 | 0.5.1 | 0.5.1 | 0.5.1 | 0.5.1 would require
         └─ __osx >=13.3, for which no candidates were found.
```

This was already found previously in
prefix-dev#562 (comment),
and the fix is to add a minimum macOS version.
Note that the conda-forge package metadata (saying >=13.3) is also incorrect,
the 13.5 minimum added to the example comes from the MLX docs:
https://ml-explore.github.io/mlx/build/html/install.html#

While we're at it, also update to a recent MLX version.
rgommers added a commit to rgommers/pixi that referenced this issue Aug 8, 2024
The example as it was would not solve, it ends with a fairly
obscure error:

```
  × failed to solve the conda requirements of 'mlx' 'osx-arm64'
  ╰─▶ Cannot solve the request because of: mlx >=0.5.0,<0.6.0 cannot be installed because there are no viable options:
      └─ mlx 0.5.0 | 0.5.0 | 0.5.0 | 0.5.0 | 0.5.0 | 0.5.1 | 0.5.1 | 0.5.1 | 0.5.1 | 0.5.1 would require
         └─ __osx >=13.3, for which no candidates were found.
```

This was already found previously in
prefix-dev#562 (comment),
and the fix is to add a minimum macOS version.
Note that the conda-forge package metadata (saying >=13.3) is also incorrect,
the 13.5 minimum added to the example comes from the MLX docs:
https://ml-explore.github.io/mlx/build/html/install.html#

While we're at it, also update to a recent MLX version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Feature request
Projects
None yet
Development

No branches or pull requests

4 participants