Windows:Z3Exception(" init(Z3_LIBRARY_PATH)必须在使用Z3-python"之前调用)

时间:2017-09-02 03:36:05

标签: python z3

当使用使用Z3(我在Visual Studio命令提示符中构建)的python脚本(oyente)时,我遇到以下错误:

File "C:\Python27\Lib\site-packages\oyente\z3\z3core.py", line 23, in lib
    raise Z3Exception("init(Z3_LIBRARY_PATH) must be invoked before using Z3-python")
z3.z3types.Z3Exception: init(Z3_LIBRARY_PATH) must be invoked before using Z3-python
Exception AttributeError: "Context instance has no attribute 'lib'" in <bound method Context.__del__ of <z3.z3.Context instance at 0x0000000003A5AC48>> ignored

我在z3和oyente目录中有libz3.dll文件,在系统变量的PYTHONPATH中,我添加了可能需要的每个目录,例如:

enter image description here

2 个答案:

答案 0 :(得分:0)

从64位版本的python或其他方式调用32位版本的Z3时,这是一个常见错误。

答案 1 :(得分:0)

你见过Installing Z3 + Python on Windows吗?正如Nikolaj指出的那样,无论是在Z3还是Python或者你的机器本身,似乎都是32/64的混乱。