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 installs successfully but when running a task fails with system mismatching virtual package #2243

Open
2 tasks done
saschahofmann opened this issue Oct 9, 2024 · 0 comments

Comments

@saschahofmann
Copy link
Contributor

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

On Ubuntu 18.04.6 with glibc 2.27 with

[project]
authors = [{name = "Tester", email = "tester@gmail.com"}]
dependencies = []
description = "Add a short description here"
name = "test"
requires-python = ">= 3.11"
version = "0.1.0"

[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]

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

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

[tool.pixi.tasks]
lint = "ruff check ."

[tool.pixi.dependencies]
ruff = ">=0.6.9,<0.7"

Run pixi install which runs successfully and then pixi run --verbose lint which fails with:

INFO pixi::environment: verifying prefix location is unchanged, with prefix file: /home/shofmann/Projects/test/.pixi/envs/default/conda-meta/pixi_env_prefix
 INFO pixi::lock_file::update: the lock-file is up-to-date
 INFO pixi::cli::run: Task graph: TaskGraph: number of nodes: 1, nodes: task: lint, environment: default, command: `ruff check .`, additional arguments: ``, depends-on: ``
✨ Pixi task (lint): ruff check .
 INFO pixi::task::executable_task: Checking if task can be skipped
 INFO pixi::environment: Creating prefix file at: /home/shofmann/Projects/test/.pixi/envs/default/conda-meta/pixi_env_prefix
 INFO pixi::environment: No update needed for the prefix file.
 INFO pixi::environment: Checking if history file exists: /home/shofmann/Projects/test/.pixi/envs/default/conda-meta/history
 INFO pixi::lock_file::resolve::uv_resolution_context: uv keyring provider is disabled
 INFO pixi::install_pypi: Nothing to do - Audited 1 distribution in 14ms
  × The current system has a mismatching virtual package. The project requires '__glibc' to be at least version '2.28' but the system has version '2.27'

Issue description

I am on Ubuntu 18.04.6 with glibc 2.27 (ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27) when I pixi install it finishes successfully, creates a lockfile and the environment with no complaints. However, when I try to run a task e.g. pixi run lint it fails with

× The current system has a mismatching virtual package. The project requires '__glibc' to be at least version '2.28' but the system has version '2.27'

I am also running with direnv so the env is automatically activated and I can run python ruff check without any problems, which is why I think the installation is working just fine

Adding

[tool.pixi.system-requirements]
libc = {family = "glibc", version = "2.27"}

to my pyproject.toml fixes the issue but I still find the behaviour confusing. Why is running a task trying to resolve the environment again? Even adding the --frozen flag when running the task doesn't change the behaviour. Also shouldn't this "issue" (it doesn't seem to be a real problem) be raise before? The error message is also not clear about which package is creating this issue.

Expected behavior

  1. Dont resolve the system requirements again when running a task
  2. Either fail when generating the lockfile the first time or don't fail at all since there doesn't seem to be an issue.
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

1 participant