fix: detect and repair broken _decimal C extension before pip install #13

Merged
JMR-dev merged 1 commits from claude/pip-decimal-import-error-eVPBv into main 2026-05-22 19:21:35 +00:00
JMR-dev commented 2026-05-22 19:21:21 +00:00 (Migrated from github.com)

When python3-full is not installed on Debian/Ubuntu (common with Python
3.13), the _decimal C extension fails to import, crashing any pip
invocation with RuntimeError. Add _python3_decimal_ok() to probe for
this, and _fix_python3_decimal() to install python3-full (apt) or
python3-libs (dnf). _install_pip() now calls these before attempting
any ensurepip/pip operations so the error is fixed automatically rather
than producing an unrecoverable crash.

https://claude.ai/code/session_01Lrg3UV7AJN9KRXyTTWGgZi

When python3-full is not installed on Debian/Ubuntu (common with Python 3.13), the _decimal C extension fails to import, crashing any pip invocation with RuntimeError. Add _python3_decimal_ok() to probe for this, and _fix_python3_decimal() to install python3-full (apt) or python3-libs (dnf). _install_pip() now calls these before attempting any ensurepip/pip operations so the error is fixed automatically rather than producing an unrecoverable crash. https://claude.ai/code/session_01Lrg3UV7AJN9KRXyTTWGgZi
Sign in to join this conversation.