Skip to content

Bug Report: Latest python image tag 3.12.9 breaks CircleCI pipeline for poetry installs: "error while loading shared libraries: libpython3.12" #265

@ronand97

Description

@ronand97

Note: We also welcome PRs to fix bugs! This helps us take action faster where a bug has been identified!

For our official CircleCI Docker Convenience Image support policy, please see CircleCI docs.

This policy outlines the release, update, and deprecation policy for CircleCI Docker Convenience Images.


Describe the bug
When using the latest python image 3.12.9 the poetry install fails with error:

/home/circleci/.local/share/pypoetry/venv/bin/python: error while loading shared libraries: libpython3.12.so.1.0: cannot open shared object file: No such file or directory

Exited with code exit status 127

.
I believe this is due to the PR merged on Friday 7th February as our builds have been failing since then:
#262

To Reproduce
In config.yml I have a job like so (job name and directory names removed for security):

  <job-name>:
    executor:
      name: python/default
      tag: "3.12"
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ checksum "./.pre-commit-config.yaml" }}-py3108
      - run:
          name: Install dependencies
          command: pip install pre-commit
      - run:
          name: Run static checks
          command: pre-commit run --all
      - save_cache:
          key: deps-{{ checksum "./.pre-commit-config.yaml" }}-py3108
          paths:
            - /home/circleci/.local # For pre-commit executable
            - /home/circleci/.cache # For pre-commit cache (installed hooks)
      - python/install-packages:
          app-dir: <dir>
          pkg-manager: poetry
      - run:
          name: Run Tests
          working_directory: <dir>
          command: poetry run pytest tests

Note that I am using the python3 orb:

orbs:
  python: circleci/python@3.0.0

I believe this pulls down the latest python 3.12.* image as our builds started failing since the latest release.

Expected behavior
Package install succeeds

Workarounds
Pinning the tag to the penultimate image version (3.12.8) fixes the issue:

executor:
      name: python/default
      tag: "3.12.8"

Screenshots and Build Links
If possible, add screenshots and links to jobs to help explain your problem.

Image

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions