docs/aarch64-compatibility.md
This document describes the compatibility status and known issues for g4f on aarch64 (ARM64) systems.
Fixed in this release: The "Illegal instruction (core dumped)" error that occurred when importing g4f on aarch64 systems has been resolved.
Previously, g4f would crash with "Illegal instruction (core dumped)" on ARM64 systems (such as Apple Silicon Macs, Raspberry Pi, AWS Graviton instances, etc.) due to compiled dependencies with architecture-specific optimizations.
The library now includes proper error handling for architecture-incompatible dependencies:
from g4f.client import Client)g4f --help, g4f client --help)Some advanced features may have reduced functionality on aarch64:
curl_cffi will fall back to aiohttpFor full functionality on aarch64, ensure you have:
# Basic requirements (should work on all architectures)
pip install -r requirements-min.txt
# Full requirements (some packages may need compilation on aarch64)
pip install -r requirements.txt
You can verify your installation works correctly:
# Test basic import
from g4f.client import Client
client = Client()
print("✓ g4f imported successfully")
# Test CLI
import subprocess
result = subprocess.run(['g4f', '--help'], capture_output=True)
print("✓ CLI works" if result.returncode == 0 else "✗ CLI issues")
If you encounter issues on aarch64:
pip install -r requirements-min.txtuname -muname -apython --version