Stop cmd window from opening when running pyomo from external environment

Viewed 62

I am calling pyomo from an external environment (Matlab) using Windows 10. Everytime I call the function pyomo.opt.solve (e.g. results = pyomo.opt.solve(model)) a cmd.exe window pops up and closes right after. This is very cumbersome when I have a for loop calling the function multiple times in a row. It takes a considerable amount of time (~0.5 s) to open and close the cmd.exe window, and it does not allow me to use other programs in the meantime.

If I call the function pyomo.opt.solve from inside of a python IDE like Spyder, the cmd.exe window does not pop up. And the same is true if I call other python functions from Matlab. So I am assuming this window only pops up when calling pyomo.opt.solve from Matlab or possibly other external programs.

Can I stop pyomo.opt.solve() from opening a new cmd.exe window?

0 Answers
Related