'why does minizinc python show TypeError: Can't instantiate abstract class Instance with abstract methods

0

Though i've Minizinc installed in my PC! still getting this error: --> 12 instance = Instance(gecode, nqueens) ImportError: cannot import name 'Instance' from 'minizinc' So, i modified the code : from minizinc.instance import Instance But i've got: ---> 12 instance = Instance(gecode, nqueens) TypeError: Can't instantiate abstract class Instance with abstract methods init, branch, method, solutions

trying to follow : minizinc python installation but without a result



Solution 1:[1]

I?t sounds like you are using a Jupyter notebook, which has a known problem: since it uses asynchronous Python loop, it cannot call anything that itself also calls an asynchronous Python loop. For MiniZinc Python this is discussed here: https://github.com/MiniZinc/minizinc-python/issues/38 which also gives a few solutions

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AHMED Roumane