mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
improved z3py installation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
12882f865f
commit
44a98920d1
14 changed files with 33 additions and 96 deletions
|
@ -1,26 +0,0 @@
|
|||
In your Python application you should include:
|
||||
|
||||
from z3 import *
|
||||
|
||||
Installing the Z3 Python bindings
|
||||
|
||||
Option 1: Install Z3 Python bindings in your python distribution
|
||||
----------------------------------------------------------------
|
||||
|
||||
To install the Z3 python bindings in your system, use
|
||||
sudo make install-python
|
||||
in the Z3 root directory.
|
||||
After installing the Z3 python bindings, you can try the example application
|
||||
python example.py
|
||||
|
||||
Option 2: Set PYTHONPATH
|
||||
------------------------
|
||||
|
||||
You may also use Z3Py by including this directory in your PYTHONPATH.
|
||||
Z3Py searches for libz3.so in set of predefined places that includes the directory where Z3Py is stored.
|
||||
You may also manually initialize Z3Py using the command z3.init(path-to-libz3.so)
|
||||
|
||||
Learn more about Z3Py at:
|
||||
http://rise4fun.com/Z3Py/tutorial/guide
|
||||
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
In your Python application you should include:
|
||||
|
||||
from z3 import *
|
||||
|
||||
Installing the Z3 Python bindings
|
||||
|
||||
Option 1: Install Z3 Python bindings in your python distribution
|
||||
----------------------------------------------------------------
|
||||
|
||||
To install the Z3 python bindings in your system, use
|
||||
sudo make install-python
|
||||
in the Z3 root directory.
|
||||
After installing the Z3 python bindings, you can try the example application
|
||||
python example.py
|
||||
|
||||
Option 2: Set PYTHONPATH
|
||||
------------------------
|
||||
|
||||
You may also use Z3Py by including this directory in your PYTHONPATH.
|
||||
Z3Py searches for libz3.dylib in set of predefined places that includes the directory where Z3Py is stored.
|
||||
You may also manually initialize Z3Py using the command z3.init(path-to-libz3.dylib)
|
||||
|
||||
Learn more about Z3Py at:
|
||||
http://rise4fun.com/Z3Py/tutorial/guide
|
|
@ -1,16 +0,0 @@
|
|||
To run the test script execute:
|
||||
python example.py
|
||||
|
||||
To create scripts using Z3Py, the Z3 python directory must be in your PYTHONPATH.
|
||||
If you copy the z3*.py files to a different directory, you must also copy the z3.dll.
|
||||
Remark: if you are using python 32-bit, you must copy the z3.dll in the bin directory.
|
||||
If you are using python 64-bit, you must copy the z3.dll in the x64 directory.
|
||||
|
||||
You may also manually initialize Z3Py using the command z3.init(path-to-z3.dll)
|
||||
|
||||
In your Python application you should include:
|
||||
|
||||
from z3 import *
|
||||
|
||||
Learn more about Z3Py at:
|
||||
http://rise4fun.com/Z3Py/tutorial/guide
|
|
@ -1,5 +1,20 @@
|
|||
To run the test script execute:
|
||||
python example.py
|
||||
|
||||
Learn more about Z3Py at:
|
||||
You can learn more about Z3Py at:
|
||||
http://rise4fun.com/Z3Py/tutorial/guide
|
||||
|
||||
On Windows, you must build Z3 before using Z3Py.
|
||||
To build Z3, you should executed the following command
|
||||
in the Z3 root directory at the Visual Studio Command Prompt
|
||||
|
||||
msbuild /p:configuration=external
|
||||
|
||||
If you are using a 64-bit Python interpreter, you should use
|
||||
|
||||
msbuild /p:configuration=external /p:platform=x64
|
||||
|
||||
|
||||
On Linux and OSX, you must install Z3Py, before trying example.py.
|
||||
To install Z3Py on Linux and OSX, you should execute the following
|
||||
command in the Z3 root directory
|
||||
|
||||
sudo make install-z3py
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
export PYTHONPATH=../../python:$PYTHONPATH
|
||||
python example.py
|
|
@ -1,2 +0,0 @@
|
|||
export PYTHONPATH=../../python:$PYTHONPATH
|
||||
python example.py
|
|
@ -1,2 +0,0 @@
|
|||
export LD_LIBRARY_PATH=.
|
||||
python example.py
|
|
@ -1,2 +0,0 @@
|
|||
export LD_LIBRARY_PATH=.
|
||||
python example.py
|
|
@ -1,2 +0,0 @@
|
|||
export LD_LIBRARY_PATH=.
|
||||
python example.py
|
|
@ -8,10 +8,9 @@ def _find_lib():
|
|||
_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
libs = ['z3.dll', 'libz3.so', 'libz3.dylib']
|
||||
if sys.maxsize > 2**32:
|
||||
winlibdir = 'x64'
|
||||
locs = [_dir, '%s%s..%sx64%sexternal' % (_dir, os.sep, os.sep, os.sep), '%s%s..%sbin%sexternal' % (_dir, os.sep, os.sep, os.sep)]
|
||||
else:
|
||||
winlibdir = 'bin'
|
||||
locs = [_dir, '%s%s..%s%s' % (_dir, os.sep, os.sep, winlibdir), '%s%s..%slib' % (_dir, os.sep, os.sep), '%s%s..%sexternal' % (_dir, os.sep, os.sep), '%s%s..%sbin%sexternal' % (_dir, os.sep, os.sep, os.sep)]
|
||||
locs = [_dir, '%s%s..%sexternal' % (_dir, os.sep, os.sep), '%s%s..%sbin%sexternal' % (_dir, os.sep, os.sep, os.sep)]
|
||||
for loc in locs:
|
||||
for lib in libs:
|
||||
f = '%s%s%s' % (loc, os.sep, lib)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue