-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Using Z3Py on Windows
Gera Weiss edited this page Oct 8, 2018
·
9 revisions
- Download the latest pre-compiled binaries
- Unzip the file in your favorite directory (e.g., c:\z3py)
- Add the "bin" subdirectory to the environment variable PATH and the "bin\python\z3" subdirectory to the environment variable PYTHONPATH
Remark: If you are using a 32-bit Python, then you must download the 32-bit (x86) pre-compiled Z3 binaries even if you have a 64-bit machine.
Download/clone the source code
git clone https://github.com/Z3Prover/z3.git
Open a Visual Studio Command Prompt, go to the Z3 directory, and execute
python scripts/mk_make.py
cd build
nmake
All files necessary to execute Z3Py are located in the build directory. Now, we just need to include this directory in the environment variables PYTHONPATH and PATH
It is very similar to the 32-bit case. However, we have to use a Visual Studio x64 Command Prompt, and add -x
to mk_make.py
python scripts/mk_make.py -x
cd build
nmake