pytest-codspeed icon indicating copy to clipboard operation
pytest-codspeed copied to clipboard

Local run fails when using `uv` with a Python version built by `uv`

Open adriencaccia opened this issue 9 months ago • 0 comments

The following command fails with .venv/bin/../lib/libpython3.12.so.1.0: cannot open shared object file: No such file or directory:

codspeed run -- uv run pytest tests/
   PREPARING THE ENVIRONMENT 

Environment ready


   RUNNING THE BENCHMARKS 

/home/ubuntu/projects/codspeed/demo/.venv/bin/python: error while loading shared libraries: /home/ubuntu/projects/codspeed/demo/.venv/bin/../lib/libpython3.12.so.1.0: cannot open shared object file: No such file or directory
Error: failed to execute the benchmark process

Steps to reproduce:

Create the following pyproject.toml file:

[project]
name = "demo"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = "==3.12.8"
dependencies = [
    "pytest~=8.3.2",
    "pytest-benchmark~=4.0.0",
    "pytest-codspeed~=3.2.0",
]

[tool.uv]
required-version = ">=0.5.20" # will be picked up by the astral-sh/setup-uv GH action

Run the following command:

uv sync --all-extras --dev
codspeed run -- uv run pytest tests/ --codspeed

adriencaccia avatar Mar 11 '25 14:03 adriencaccia