lincc-frameworks / python-project-template

Python project best practices for scientific software
https://lincc-ppt.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
61 stars 15 forks source link

ASV is failing on github actions #477

Closed jeremykubica closed 6 days ago

jeremykubica commented 1 week ago

We've started seeing ASV fail on github actions with the error:

Run sudo apt-get update
  sudo apt-get update
  pip install asv==0.6.1 virtualenv tabulate lf-asv-formatter
  shell: /usr/bin/bash -e {0}
  env:
    PYTHON_VERSION: 3.10
    WORKING_DIR: /home/runner/work/tdastro/tdastro/benchmarks
    ARTIFACTS_DIR: /home/runner/work/tdastro/tdastro/artifacts
Hit:1 http://azure.archive.ubuntu.com/ubuntu noble InRelease
Get:[2](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:2) http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:[3](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:3) http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:[4](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:4) http://azure.archive.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:[5](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:5) http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd[6](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:6)4 Packages [534 kB]
Get:6 http://azure.archive.ubuntu.com/ubuntu noble-updates/main Translation-en [130 kB]
Get:[7](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:7) http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 c-n-f Metadata [[8](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:8)636 B]
Get:8 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [377 kB]
Get:[9](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:10) http://azure.archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [156 kB]
Get:10 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [14.8 kB]
Get:11 http://azure.archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [[10](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:11).6 kB]
Get:12 http://azure.archive.ubuntu.com/ubuntu noble-backports/universe amd64 c-n-f Metadata [[11](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:12)04 B]
Get:13 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Packages [380 kB]
Get:14 http://azure.archive.ubuntu.com/ubuntu noble-security/main Translation-en [82.9 kB]
Get:15 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 c-n-f Metadata [4560 B]
Get:16 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 Packages [272 kB]
Get:17 http://azure.archive.ubuntu.com/ubuntu noble-security/universe Translation-en [115 kB]
Get:18 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [10.3 kB]
Hit:19 https://packages.microsoft.com/repos/azure-cli noble InRelease
Get:20 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease [3600 B]
Get:21 https://packages.microsoft.com/ubuntu/24.04/prod noble/main armhf Packages [4999 B]
Get:22 https://packages.microsoft.com/ubuntu/24.04/prod noble/main arm64 Packages [8154 B]
Get:23 https://packages.microsoft.com/ubuntu/24.04/prod noble/main amd64 Packages [11.8 kB]
Fetched 2505 kB in 1s (3467 kB/s)
Reading package lists...
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.[12](https://github.com/lincc-frameworks/tdastro/actions/runs/11074118402/job/30772199187?pr=139#step:5:13)/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Error: Process completed with exit code 1.
jeremykubica commented 1 week ago

It started passing again without us having to change anything. Not sure what the problem was.

hombit commented 6 days ago

I'm reopening it since it fails again with tdastro and nested-dask https://github.com/lincc-frameworks/nested-dask/issues/57

hombit commented 6 days ago

I tried to prototype a fix here, but I broke asv-formatter somehow https://github.com/lincc-frameworks/nested-dask/pull/58