Skip to content

fix(cv): fully purge base OpenCV before reinstalling opencv-python#42

Merged
rwlove merged 1 commit into
mainfrom
fix/cv-opencv-ffmpeg-clean-purge
Jun 12, 2026
Merged

fix(cv): fully purge base OpenCV before reinstalling opencv-python#42
rwlove merged 1 commit into
mainfrom
fix/cv-opencv-ffmpeg-clean-purge

Conversation

@rwlove

@rwlove rwlove commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Follow-up to #41, which failed the base build on arm64.

Why #41 failed

The nvcr opencv package and the opencv-python wheel install into the same site-packages/cv2/ directory. A plain pip uninstall + reinstall left residual files, so import cv2 still loaded the headless build (FFMPEG: NO) and the build-time assert correctly failed.

Confirmed on the real arm64 (spark) node: a clean opencv-python 4.13 install reports FFMPEG: YES — the aarch64 wheel does ship FFmpeg. The site-packages held both opencv-4.10.0.dist-info and opencv_python-4.11.0.86.dist-info over one cv2/ dir.

Fix

Uninstall every opencv variant, then rm -rf the leftover cv2/, opencv*.dist-info, and opencv_python.libs, then install opencv-python clean. Arch-agnostic; the FFmpeg assert still guards against regressions.

🤖 Generated with Claude Code

The first attempt (uninstall + force-reinstall) failed the build-time assert
on arm64: the nvcr `opencv` and the `opencv-python` wheel share the same
site-packages cv2/ directory, so a plain uninstall left residual files that
kept shadowing the wheel — `import cv2` still resolved to the headless build
(FFMPEG: NO).

Confirmed on the real arm64 node: a clean opencv-python 4.13 install reports
FFMPEG: YES (the aarch64 wheel does ship FFmpeg), and site-packages held both
opencv-4.10.0.dist-info and opencv_python-4.11.0.86.dist-info pointing at one
cv2/ dir.

Fix: uninstall every opencv variant, then rm -rf the leftover cv2/ dir,
opencv*.dist-info, and opencv_python.libs before a clean opencv-python
install. Works on amd64 and arm64; the FFmpeg assert still guards regressions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rwlove rwlove merged commit 2448c1c into main Jun 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant