DocGurk
DocGurk

Reputation: 61

Can't call functions of imported module

I'm trying to use the z3 module in python. I installed it using pip on windows. However when i try to execute this code

from z3 import *

...

s = Solver()
s.add(c1, c2, c3, c4, c5, c6, c7)
s.model()

I get "NameError: name 'Solver' is not defined".

What I find odd is that importing does not generate an error message, so it should have worked, yet when I try to call different functions they seem to not exist.

Am I doing something completely wrong?

Upvotes: 2

Views: 3267

Answers (1)

DocGurk
DocGurk

Reputation: 61

It was an installation Issue the module z3 is actually different from z3-solver (which is the one people in the examples use).

You can install it without Visual Studio Prompts like this: https://github.com/Z3Prover/z3/wiki/Using-Z3Py-on-Windows

Upvotes: 4

Related Questions