or-fusion / pao

A Python Package for Adversarial Optimization
Other
17 stars 15 forks source link

cannot load pao.pyomo #77

Closed theodorska closed 3 years ago

theodorska commented 3 years ago

I am having issues installing pao and using it in jupyter notebook. I have installed and uninstalled several times using pip and git clone.

If I try "from pao.pyomo import *". I get "AttributeError : partially initialized module 'pao' has no attribute 'bilevel' (most likely due to a circular import)".

If I try "from pao import *". I get "AttributeError: partially initialized module 'pao' has no attribute 'bilevel' (most likely due to a circular import)"

I was able to load "from pao.bilevel import *" on the second try after getting an error the first time. however, I am not sure if I am able to get full access to its features.

update: I was able to fix the issue by uninstalling pyomo and pao, and just installing pao which installed the correct version of pyomo for it to work.