uqfoundation / mystic

constrained nonlinear optimization for scientific machine learning, UQ, and AI
http://mystic.rtfd.io
Other
464 stars 50 forks source link

ModuleNotFoundError: No module named 'mystic.models' #139

Closed radmaker closed 3 years ago

radmaker commented 3 years ago

I was trying to run example02.py from 'examples' which minimizes Rosenbrock's Function with Nelder-Mead. However there occurred a ModuleNotFoundError. After copying the 'models' subdir into the 'mystic' subdir it worked. I was also trying to change the import statement to:

from models import rosen

This leads to the same error, this time in 'poly.py'.

mmckerns commented 3 years ago

How was this built? How was this run? Can you share mystic version number and python version? I'm not able to reproduce in my environment, but maybe I could with more information.

mmckerns commented 3 years ago

One might experience something like you are if one didn't install the code (using python setup.py install or pip install mystic), but instead downloaded the source tarball and tried to run it in place.

I'm going to assume that's what happened. However, if it's not, then please do reopen this issue and provide more information.