ChimeraX 1.10 Find Cavities (pyKVFinder) Installation Failure on Apple Silicon macOS

Summary

The "Find Cavities" tool in ChimeraX 1.10 fails to install pyKVFinder on Apple Silicon macOS systems because the bundled Python environment attempts to compile pyKVFinder using Apple's system clang, which does not support the OpenMP compiler flag used by pyKVFinder.

Additionally, following the suggested installation path through ChimeraX's Python can cause pip to upgrade NumPy from 1.26.4 to 2.x, resulting in ChimeraX crashing with a segmentation fault on startup due to ABI incompatibilities with ChimeraX binary extensions.

Environment

- ChimeraX version: 1.10
- Platform: macOS (Apple Silicon)
- Hardware: MacBook Air M2
- Python bundled with ChimeraX: 3.11
- Homebrew LLVM: 22.1.7
- Homebrew libomp: 22.1.8

Initial Failure

Launching:

Tools → Structure Analysis → Find Cavities

causes ChimeraX to automatically install pyKVFinder.

Installation fails with:

error: unknown argument: '-fopenmp=libomp'
error: command '/usr/bin/clang' failed with exit code 1

The issue is that ChimeraX invokes Apple's system clang (/usr/bin/clang), which lacks OpenMP support.

Additional Packaging Issue

The bundled pip executable is broken:

/Applications/ChimeraX-1.10.app/Contents/bin/pip

returns:

bad interpreter:
/Users/runner/work/ChimeraX/ChimeraX/build/bin/python3.11

This path appears to be a build-machine path embedded into the shipped pip wrapper.

Workaround:

/Applications/ChimeraX-1.10.app/Contents/bin/python3.11 -m pip ...

works correctly.

Successful pyKVFinder Build

After installing Homebrew LLVM and libomp and setting CC/CXX/CPPFLAGS/LDFLAGS appropriately, the following succeeds:

/Applications/ChimeraX-1.10.app/Contents/bin/python3.11 -m pip install pyKVFinder

pyKVFinder builds successfully.

Critical Issue: NumPy Upgrade Breaks ChimeraX

During installation, pip upgrades NumPy:

numpy 1.26.4 → numpy 2.4.6

and emits:

chimerax-bundlebuilder 1.5.1 requires numpy==1.26.4

along with additional dependency incompatibility warnings.

After installation, ChimeraX no longer starts and immediately crashes:

/Applications/ChimeraX-1.10.app/Contents/bin/ChimeraX

Output:

zsh: segmentation fault

The bundled Python remains functional, but the ChimeraX executable crashes before opening the GUI.

Expected Behavior

1. Find Cavities should either ship with a compatible pyKVFinder build for Apple Silicon or detect missing OpenMP support and provide platform-specific instructions.
2. ChimeraX should not allow pip to upgrade core dependencies such as NumPy beyond versions compatible with bundled binary extensions.
3. The bundled pip launcher should not contain an invalid build-machine interpreter path.

Suggested Fixes

- Bundle pyKVFinder binaries for Apple Silicon.
- Pin NumPy to the version required by ChimeraX during extension installation.
- Prevent extension installers from modifying core ChimeraX dependencies.
- Fix the broken pip wrapper shipped inside the application bundle.
- Improve error reporting for OpenMP-related build failures on macOS.
