Hmm, actually, the py2 module does not seem to work anyway: $ dpkg -l | grep z3 | grep py ii python-z3 4.8.4-1 amd64 theorem prover from Microsoft Research - Python bindings $ python2 -c 'import z3; print(z3.get_version_string())' Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named z3 $ python -c 'import z3; print(z3.get_version_string())' Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named z3 $ python3 -c 'import z3; print(z3.get_version_string())' Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'z3' $ dpkg -L python-z3 /. /usr /usr/lib /usr/lib/python2.7 /usr/lib/python2.7/dist-packages /usr/share /usr/share/doc /usr/lib/python2.7/dist-packages/libz3.so /usr/share/doc/python-z3