You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Installation fails on Apple Silicon (ARM) Mac — pyboolnet BNetToPrime binary incompatible #6
Problem
BoolDog cannot be used on Apple Silicon Macs because pyboolnet ships
an Intel-only binary (BNetToPrime_mac64) that crashes immediately with:
OSError: [Errno 86] Bad CPU type in executable:
'.../pyboolnet/binaries/mac64/BNetToPrime/BNetToPrime_mac64'
This error is raised as soon as any BoolDogModel is instantiated,
making the package completely unusable on ARM hardware.
Steps to reproduce
pip install booldog
Then in Python:
import booldog
nodes = [booldog.classes.BoolDogNode(identifier='A', rule='B'),
booldog.classes.BoolDogNode(identifier='B', rule='A')]
m = booldog.BoolDogModel(nodes) # crashes here
Expected behaviour
Model instantiation should work on Apple Silicon.
Possible fix
pyboolnet would need to ship an ARM-native binary for BNetToPrime,
or BoolDog could document a workaround (e.g. running under Rosetta 2,
or using a Linux/Docker environment).
Apple Silicon Macs are now the standard hardware for Mac users,
so this affects a large portion of the potential user base. Do you have any other idea of how to work around this problem?
This is not something I want to fix in BoolDog, but should be fixed in pyboolnet itself, ideally by compiling new binaries. I unfortunately don't have access to a Mac to develop or test workarounds (even just for documentation). I'll raise the issue upstream at pyboolnet (unless you'd like to?).
A Docker image is a good idea, though, and I can work on that.
In the meantime, you can use BoolDog in Google Colab (example).
I added CI for pyboolnet running on macos-latest (which is Apple Silicon on GitHub Actions), and the exact scenario from this issue (instantiating a BoolDogModel, which calls BNetToPrime under the hood) does not reproduce there. It runs successfully in both pyboolnet's own test suite and in BoolDog's own CI on the same runner type.
To find out why, I added a diagnostic step that checks for Rosetta 2 directly (run log). Rosetta 2 is confirmed present and working on the GitHub-hosted macOS runner:
--- native arch ---
arm64
--- oahd translation daemon (modern check) ---
457 /usr/libexec/rosetta/oahd
--- rosetta runtime present ---
... /Library/Apple/usr/libexec/oah/libRosettaRuntime ...
--- direct test: actually run something under x86_64 ---
x86_64 execution via Rosetta: OK
Since BNetToPrime_mac64 is an Intel binary, I think you are correct that using Rosetta 2 is a work around.
Activity
carissableker commentedon May 13, 2026
Hi @eltonengkilde, thanks for your report!
This is not something I want to fix in BoolDog, but should be fixed in pyboolnet itself, ideally by compiling new binaries. I unfortunately don't have access to a Mac to develop or test workarounds (even just for documentation). I'll raise the issue upstream at pyboolnet (unless you'd like to?).
A Docker image is a good idea, though, and I can work on that.
In the meantime, you can use BoolDog in Google Colab (example).
carissableker commentedon May 13, 2026
TODO - make a note in Known installation issues
Add CI workflow for tests and tutorial notebooks
carissableker commentedon Jul 6, 2026
Update after digging into this on the pyboolnet side (carissableker/pyboolnet, tracking hklarner/pyboolnet#126):
I added CI for pyboolnet running on
macos-latest(which is Apple Silicon on GitHub Actions), and the exact scenario from this issue (instantiating aBoolDogModel, which callsBNetToPrimeunder the hood) does not reproduce there. It runs successfully in both pyboolnet's own test suite and in BoolDog's own CI on the same runner type.To find out why, I added a diagnostic step that checks for Rosetta 2 directly (run log). Rosetta 2 is confirmed present and working on the GitHub-hosted macOS runner:
Since
BNetToPrime_mac64is an Intel binary, I think you are correct that using Rosetta 2 is a work around.I've added a note to BoolDog's Known installation issues docs.
Update installation known issues (#6), add Docker and Colab alternatives