CircleCI-Public / CircleCI-Public/cimg-python

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

Open
#265 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Dockerfile
Stars
36
Forks
33
PR merge metrics
No merged PRs in 30d

Description

*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](https://circleci.com/docs/convenience-images-support-policy).

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:
https://github.com/CircleCI-Public/cimg-python/pull/262

**To Reproduce**
In `config.yml` I have a job like so (job name and directory names removed for security):
```yml
:
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:
pkg-manager: poetry
- run:
name: Run Tests
working_directory:
command: poetry run pytest tests
```

Note that I am using the python3 orb:
```yml
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:
```yml
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.