Skip to content

fix: install libpng-dev and pin reticulate to correct Python for CI#7

Merged
kinyoklion merged 2 commits intomainfrom
devin/1773351519-fix-ci-libpng
Mar 13, 2026
Merged

fix: install libpng-dev and pin reticulate to correct Python for CI#7
kinyoklion merged 2 commits intomainfrom
devin/1773351519-fix-ci-libpng

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Mar 12, 2026

Summary

The CI build was failing due to two issues:

1. Missing libpng-dev system package
The reticulate R package's dependency png fails to compile on ubuntu-latest because libpng-dev is not installed. Added an explicit step to install it.

/bin/bash: line 1: libpng-config: command not found
read.c:3:10: fatal error: png.h: No such file or directory
ERROR: compilation failed for package 'png'
ERROR: dependency 'png' is not available for package 'reticulate'

2. reticulate using wrong Python
After fixing the first issue, reticulate was downloading its own Python 3.12 via uv instead of using the Python 3.8 where launchdarkly-server-sdk was pip-installed, causing ModuleNotFoundError: No module named 'ldclient'. Fixed by creating a venv from the setup-python installation and setting RETICULATE_PYTHON to point to it.

Root cause run: failed run

Review & Testing Checklist for Human

  • Verify CI passes on this PR (it did on the latest push, but confirm it stays green)
  • Confirm the RETICULATE_PYTHON + venv approach is the preferred way to pin reticulate to a specific Python — an alternative would be calling reticulate::use_python() in main.r or setting RETICULATE_PYTHON_ENV
  • Consider whether Python 3.8 (EOL) should be bumped to a supported version in a follow-up — this is a pre-existing concern, not introduced by this PR

Notes

Co-Authored-By: rlamb@launchdarkly.com <kingdewman@gmail.com>
@devin-ai-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

…t Python

Co-Authored-By: rlamb@launchdarkly.com <kingdewman@gmail.com>
@devin-ai-integration devin-ai-integration bot changed the title fix: install libpng-dev for reticulate R package compilation fix: install libpng-dev and pin reticulate to correct Python for CI Mar 12, 2026
@kinyoklion kinyoklion marked this pull request as ready for review March 12, 2026 21:47
@kinyoklion kinyoklion requested a review from a team as a code owner March 12, 2026 21:47
@kinyoklion kinyoklion merged commit 02c6cfa into main Mar 13, 2026
3 checks passed
@kinyoklion kinyoklion deleted the devin/1773351519-fix-ci-libpng branch March 13, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants