You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mismatching virtual package error should hint to solution (set system-requirements) #346
$ pixi init
$ pixi add python
$ pixi install
x 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'
should be something like
$ pixi init
$ pixi add python
$ pixi install
x 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'. Try setting the following in your pixi.toml:
[system-requirements]
linux="4.18"
Similar for other virtual packages.
Reacted by Bas Zalmstra, Yang An, Michael Beyeler, Mikkel Roald-Arbøl, Pablo Vela, Thomas Friedel, Gary Miguel, Taeyoon Kim, Alessandro, UENO, M. and 9 more
I should mention that the fix for this was not to add something to [system-requirements], but rather I needed to add "linux-64" to the platforms. It be very helpful if pixi would tell the user that.
Honestly the users should feel the power of system requirements and not the downside. I've got a proposal to solve this issue with some workflow improvements:
TL;DR: Make pixi more flexible and let it interact with the dependency resolution automatically, and help the user by doing the work for them.
Definitions
Virtual packages: a dependency of a package that can not be provided as a conda package, these are system specifications or libc implementation on the system. e.g. cuda, linux, macos, glibc etc. System requirements: Pixi's take on defining a virtual package in the project's manifest. It defines the requirements the project has of the machine it needs to run on, which it can't provide itself. There is a set of defaults per platform, these are used during the solve of the dependencies to avoid the solve to only work on your specific machine. If the project requires a different set then the default they need to be defined in the [system-requirements] table.
Solution
Let's make pixi solve with the current available virtual packages. Then after the solve figure out what virtual packages are required. If those differ from the default virtual packages they will automatically be added to the manifest file as system requirements. This goes both ways, having higher or lower versions on your current machine.
Solution to newly created problem
The down side of change would be that the solution(lock file) might only work for the latest machines as pixi picks the latest versions available for the given virtual packages. Potentially lowering the amount of machines your project can run on. This could be fixed by giving pixi an interactive option to re-solve for your machine, skipping the system-requirements given by the project. When it finds a different solution for your machine it automatically writes it back to the manifest, allowing the users to track these changes in vcs.
Example of the interactive prompt:
> pixi install
The project requires your system to have `cuda 12.0`.
Should I try to solve a new environment with this machine's specs?
> Yes
- No
Edit:
After some discussion about the solution to this issue. Here is a more specific resulting situation:
[system-requirements]
# Add system requirements that are non defaultcuda = "12.1"
Change I expect to be needed:
Pixi needs to share the machines virtual packages instead of the projects requirements with the solver.
Pixi needs to figure out the version of the virtual packages from the locked environment.
For conda packages it easy to just look add the dependencies of all the repodata records
For pypi the information can be read from the wheel names. Still have to figure out which wheel to select but the first version should have the same behavior as of right now.
Reacted by Mikkel Roald-Arbøl, Pavel Zwerschke, Viki, Pablo Vela, zachcp, Thomas Friedel, Taeyoon Kim, Alessandro, Zaubeerer, Tahsin Hassan Rahit and 1 more
For me personally, I think one of the confusing aspects have been around the OS-named system-requirements, and how they differ from platforms. E.g. if I have already specified osx-64 as the platform, it's been unintuitive why I'd need to additionally specify macos = "11.0" under system-requirements. Usually, the version requirements is to narrow the solving, so it took me by surprise that you could get something to solve by specifying a version - I'd think it would otherwise just attempt to solve against all system requirements for the specified platform.
Lastly, it would be great if pixi could "figure out" the correct requirement for the user's current platform. E.g. for cuda, It would make life easier for users if they didn't have to know the CUDA requirements for their particular platform. Here the target audience are not super tech-savvy, but would like to use techy tools easily. I guess that's part of @ruben-arts's proposal - is that correctly understood?
Hey @roaldarbol, Thanks for the input, this is good to take into account in the UX design. I believe that the things you mention are all atleast what I tried to explain in my proposal. So lets see what we can come up with in the first version!
I just ran into this as well and wasn't sure what it meant.
$ pixi run test
Pixi task (test in default): pytest tests
× The current system has a mismatching virtual package. The project requires
│ '__linux' to be at least version '5.10' but the system has version '5.4.0'
Encountered this one today (in a gitlab-ci pipeline):
$ pixi run py-check
Pixi task (py-check in lint): ruff check; ruff format --check
× The current system has a mismatching virtual package. The project requires
│ '__linux' to be at least version '4.18' but the system has version
│ '4.15.0'
It failed despite setting in pixi.toml:
[system-requirements]
linux = "4.15"
Since my project also contains pyproject.toml file, I also tried to remove the former change and write in pyprpoject.toml:
> [10/10] RUN . /root/.bash_profile && pixi run --manifest-path ./pixi.toml ./build.sh: 0.180 0.180 × The platform you are running on should at least have the virtual package0.180 │ __cuda on version 12.2.0, build_string: 00.180
I'm not sure how to fix it - the base container I'm using is that exact version of cuda.
I'm trying to install this gromacs version with cuda:
There aren't any instructions for how to target a specific build via the pixi.toml. I'm trying downloading the .conda and seeing if pixi will install that directly.
Activity
misc: add tip to resolve virtual package issue (#348)
jpursell commentedon May 3, 2024
This should be re-opened. I just got this unhelpful error
pixi version 0.20.1
pavelzw commentedon May 3, 2024
@ruben-arts can you reopen please? I don't have permissions to do so
jpursell commentedon May 4, 2024
I should mention that the fix for this was not to add something to [system-requirements], but rather I needed to add "linux-64" to the platforms. It be very helpful if pixi would tell the user that.
roaldarbol commentedon May 4, 2024
I also just got this for a
pypiinstall:... along with the longer
stdoutstuff.It was resolved by setting:
ruben-arts commentedon May 5, 2024
Honestly the users should feel the power of system requirements and not the downside. I've got a proposal to solve this issue with some workflow improvements:
TL;DR: Make pixi more flexible and let it interact with the dependency resolution automatically, and help the user by doing the work for them.
Definitions
Virtual packages: a dependency of a package that can not be provided as a conda package, these are system specifications or libc implementation on the system. e.g.
cuda,linux,macos,glibcetc.System requirements: Pixi's take on defining a virtual package in the project's manifest. It defines the requirements the project has of the machine it needs to run on, which it can't provide itself. There is a set of defaults per platform, these are used during the solve of the dependencies to avoid the solve to only work on your specific machine. If the project requires a different set then the default they need to be defined in the
[system-requirements]table.Solution
Let's make pixi solve with the current available virtual packages. Then after the solve figure out what virtual packages are required. If those differ from the default virtual packages they will automatically be added to the manifest file as system requirements. This goes both ways, having higher or lower versions on your current machine.
Solution to newly created problem
The down side of change would be that the solution(lock file) might only work for the latest machines as pixi picks the latest versions available for the given virtual packages. Potentially lowering the amount of machines your project can run on. This could be fixed by giving pixi an interactive option to re-solve for your machine, skipping the system-requirements given by the project. When it finds a different solution for your machine it automatically writes it back to the manifest, allowing the users to track these changes in vcs.
Example of the interactive prompt:
Edit:
After some discussion about the solution to this issue. Here is a more specific resulting situation:
Change I expect to be needed:
ping @baszalmstra @wolfv for input
roaldarbol commentedon May 7, 2024
I think it IS really powerful, so I hope it will become super intuitive! For lots of tracking software (e.g. https://github.com/DeepLabCut/DeepLabCut, https://gitlab.com/polavieja_lab/idtrackerai) installation has been a major sticking point for adoption, especially since they depend on TensorFlow and thus getting
cudajust right across platforms - this would be greatly improved by a simple specification.For me personally, I think one of the confusing aspects have been around the OS-named
system-requirements, and how they differ fromplatforms. E.g. if I have already specifiedosx-64as the platform, it's been unintuitive why I'd need to additionally specifymacos = "11.0"undersystem-requirements. Usually, the version requirements is to narrow the solving, so it took me by surprise that you could get something to solve by specifying a version - I'd think it would otherwise just attempt to solve against all system requirements for the specified platform.Lastly, it would be great if pixi could "figure out" the correct requirement for the user's current platform. E.g. for
cuda, It would make life easier for users if they didn't have to know the CUDA requirements for their particular platform. Here the target audience are not super tech-savvy, but would like to use techy tools easily. I guess that's part of @ruben-arts's proposal - is that correctly understood?baszalmstra commentedon May 8, 2024
I think your idea can work @ruben-arts but I cant really see the ramifications yet. Lets try to build an experiment in the near future.
ruben-arts commentedon May 8, 2024
Hey @roaldarbol, Thanks for the input, this is good to take into account in the UX design. I believe that the things you mention are all atleast what I tried to explain in my proposal. So lets see what we can come up with in the first version!
zachcp commentedon May 14, 2024
I just ran into this as well and wasn't sure what it meant.
3 remaining items
noamgot commentedon Dec 24, 2024
Encountered this one today (in a gitlab-ci pipeline):
It failed despite setting in
pixi.toml:Since my project also contains
pyproject.tomlfile, I also tried to remove the former change and write inpyprpoject.toml:both failed with the error mentioned above.
vsoch commentedon Jan 6, 2025
I just ran into this for cuda:
I'm not sure how to fix it - the base container I'm using is that exact version of cuda.
vsoch commentedon Jan 6, 2025
I'm trying to install this gromacs version with cuda:
There aren't any instructions for how to target a specific build via the pixi.toml. I'm trying downloading the .conda and seeing if pixi will install that directly.
diallobakary4 commentedon Mar 1, 2025
I do have this in .toml dependencies section for gromacs
gromacs = { version = "==2022.4", build = "nompi_hca75aac_100" , channel="conda-forge" }maybe adapt ther version and the build
hunger commentedon Jun 4, 2026
#6178 fixes this. It clearly lists the missing virtual packages and such.
hunger commentedon Jun 15, 2026
#6178 has landed, let's close this.