Dejan Jovanović
Dejan Jovanović

Reputation: 2125

Can I use Z3Py withouth doing a system-wide install?

I'm trying to use Z3 from its python interface, but I would prefer not to do a system-wide install (i.e. sudo make install). I tried doing a local install with a --prefix, but the Makefile is hard-coded to install into the system's python directory.

Best case, I would like run z3 directly from the build directly, in the same way I use the z3 binary (build/z3). Does anyone know how to, or have script, to run the z3py directly from the build directory, without doing an install?

Upvotes: 2

Views: 553

Answers (2)

Hinton
Hinton

Reputation: 2390

If you don't care about the python interface, edit the build/Makefile and comment out or delete the following lines in the install target:

@cp libz3$(SO_EXT) /usr/lib/python2.7/dist-packages/libz3$(SO_EXT)
@cp z3*.pyc /usr/lib/python2.7/dist-packages

Upvotes: 0

Leonardo de Moura
Leonardo de Moura

Reputation: 21475

Yes, you can do it by including the build directory in your LD_LIBRARY_PATH and PYTHONPATH environment variables.

Upvotes: 1

Related Questions