-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
I wanted to try the fix for the earlier issue, where I was advised to upgrade to the latest version of Z3 4.16.0, but seems like the wheel for z3-solver on arm64 is not the right one.
I have a Macbook with M3, I tried a fresh venv with explicit arm configuration and it installs successfully, but then I cannot import the module.
$ arch -arm64 python3 -m venv ~/.arm
$ source ~/.arm/bin/activate
(.arm) $ arch -arm64 pip install z3-solver -U
Collecting z3-solver
Using cached z3_solver-4.16.0.0.tar.gz (5.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: z3-solver
Building wheel for z3-solver (pyproject.toml) ... done
Created wheel for z3-solver: filename=z3_solver-4.16.0.0-py3-none-macosx_14_6_arm64.whl size=35138697 sha256=5204c7e82d088fb0386c4a8672dab4de3f2cc2db2f4f0f2f77189ff88168fa72
Stored in directory: /Users/anastasia/Library/Caches/pip/wheels/53/bb/e4/ebed8621a4c2ec01d8a1e6423fb976b2b5374e84fc99012f1a
Successfully built z3-solver
Installing collected packages: z3-solver
Successfully installed z3-solver-4.16.0.0
[notice] A new release of pip is available: 25.2 -> 26.0.1
[notice] To update, run: pip install --upgrade pipUsing the module:
(.arm) $ python
Python 3.14.0 (v3.14.0:ebf955df7a8, Oct 7 2025, 08:20:14) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import z3
Could not find libz3.dylib; consider adding the directory containing it to
- your system's PATH environment variable,
- the Z3_LIBRARY_PATH environment variable, or
- to the custom Z3_LIB_DIRS Python-builtin before importing the z3 module, e.g. via
import builtins
builtins.Z3_LIB_DIRS = [ '/path/to/z3/lib/dir' ] # directory containing libz3.dylib
[OSError("dlopen(/Users/anastasia/.arm/lib/python3.14/site-packages/z3/lib/libz3.dylib, 0x0006): tried: '/Users/anastasia/.arm/lib/python3.14/site-packages/z3/lib/libz3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/anastasia/.arm/lib/python3.14/site-packages/z3/lib/libz3.dylib' (no such file), '/Users/anastasia/.arm/lib/python3.14/site-packages/z3/lib/libz3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))"), TypeError('expected str, bytes or os.PathLike object, not NoneType'), OSError("dlopen(libz3.dylib, 0x0006): tried: 'libz3.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibz3.dylib' (no such file), '/usr/lib/libz3.dylib' (no such file, not in dyld cache), 'libz3.dylib' (no such file)")]
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
import z3
File "/Users/anastasia/.arm/lib/python3.14/site-packages/z3/__init__.py", line 1, in <module>
from .z3 import *
File "/Users/anastasia/.arm/lib/python3.14/site-packages/z3/z3.py", line 46, in <module>
from . import z3core
File "/Users/anastasia/.arm/lib/python3.14/site-packages/z3/z3core.py", line 79, in <module>
raise Z3Exception("libz3.%s not found." % _ext)
z3.z3types.Z3Exception: libz3.dylib not found.I also tried downloading the corresponding wheel from release page, but it doesn't seem to work either:
$ pip install z3_solver-4.16.0.0-py3-none-macosx_15_0_arm64.whl
ERROR: z3_solver-4.16.0.0-py3-none-macosx_15_0_arm64.whl is not a supported wheel on this platform.Is it possible that the linked file is not actually for arm64? Am I missing something?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels