pixi icon indicating copy to clipboard operation
pixi copied to clipboard

Improve `system-requirements` UX

Open ruben-arts opened this issue 1 year ago • 6 comments

Problem description

Currently a user is getting an error if the "default" system requirements are not sufficient for the dependency that they try to install. This is done regardless of the local system availability.

Now the user needs to understand the error and edit the [system-requirements] table.

It would be a better experience for the user if pixi automatically solves for the local machine and if that results in a more specific set of system-requirements than the default requirements it should automatically add that to the configuration (pixi.toml).

ruben-arts avatar Feb 16 '24 07:02 ruben-arts

It would be great if system-requirements could be managed by CLI similar to " project platform add ". Having to edit the toml file by hand really disrupts our workflows.

jjv5 avatar May 09 '24 12:05 jjv5

He @jjv5, I'm curious about your use-case.

Is this something you need for CI or is the command line just more comfortable for you and why would that then be?

I personally like to play around with the files so it would help me to understand this beter from your point of view. Possibly seeing the light and pushing more on cli completeness :wink:. (as currently features have a higher priority than CLI support).

Note that my question has nothing to do with this Issue, I just don't have another channel to ask you this question.

ruben-arts avatar May 10 '24 11:05 ruben-arts

We install/maintain many. many titles for a very wide OS distribution. The ability to use CLI lets us script everything.

We're currently testing pixi (and love it, thanks!) and are working on something like this at the moment:

./pixi init --platform osx-64 --platform linux-64 --channel conda-forge --channel bioconda ${verdir} ./pixi project description set "$slug $version" ./pixi project version set "${version}"
./pixi add "${slug}==${version}"

We install for older Macs and Linux machines and so would also like to be able to do something like this:

./pixi project system-requirements ' linux="3.10.0" '

Maybe not the best way to do that, but something from the command line.

It would also be nice to set project name from CLI, like the other project fields. Maybe name is special?

james-vincent avatar May 10 '24 11:05 james-vincent

@jjv5 Thanks for the elaboration! That makes total sense. Will definitely keep it in mind. Some times I just need to be reminded of these use-cases.

ruben-arts avatar May 10 '24 14:05 ruben-arts

Linked to https://github.com/prefix-dev/pixi/issues/346#issuecomment-2094906047

ruben-arts avatar May 13 '24 06:05 ruben-arts

Just adding that I ran into the following error

pixi add --pypi isaacsim-rl isaacsim-replicator isaacsim-extscache-physics isaacsim-extscache-kit-sdk isaacsim-extscache-kit isaacsim-app
  × failed to solve the pypi requirements of 'default' 'linux-64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because isaacsim-rl==4.0.0.0 has no wheels are available with a matching platform
      and only isaacsim-rl==4.0.0.0 is available, we can conclude that all versions of
      isaacsim-rl cannot be used.
      And because you require isaacsim-rl, we can conclude that the requirements are
      unsatisfiable.

which is resolved by adding

[system-requirements]
linux = "5.10"
libc = { family="glibc", version="2.39" }

However, those are most likely not the minimum system requirements. It would be nice to report the minimum set of system-requirements and hint that adding them to the pixi.toml would allow installation.

In contrast, installing via pip works out-of-the-box for these packages (probably because my system fulfills the requirements).

roym899 avatar Jul 11 '24 09:07 roym899

Just to add a point here, that is not bug but sometimes that was not intuitive at first.

I was in a Linux 4.18 system, and I quickly create a temporary pixi project with:

pixi init test
cd ./test
pixi run echo

This fails with:

  × The current system has a mismatching virtual package. The project requires '__linux' to be at least version '5.10'
  │ but the system has version '4.18.0'

this make sense, as the current system has a linux version that is lower then the default required, but was nevertheless a bit surprising for me.

traversaro avatar Aug 22 '24 09:08 traversaro