Topic: openopt with py2exe, bug??

Dr. Yuan XK, Northwestern polytechnical university, China, use OpenOpt for nonliner optimization study.

I install openopt-0.29-py2.5,  can make through with the test ''. but when I convert it to EXE with py2exe(py2exe-0.6.9.win32-py2.5), it raises the error:

Traceback (most recent call last):
  File "I:\WORK2010\text\", line 75, in <module>
    isPassed, r, p = test(iprint= 10, plot=0)
  File "I:\WORK2010\text\", line 70, in test
    r = p.solve(solver)
  File "openopt\kernel\baseProblem.pyo", line 222, in solve
  File "openopt\kernel\runProbSolver.pyo", line 62, in runProbSolver
  File "openopt\kernel\nonOptMisc.pyo", line 86, in getSolverFromStringName
  File "openopt\kernel\oologfcn.pyo", line 16, in ooerr
openopt.kernel.oologfcn.OpenOptException: incorrect solver is called, maybe the
solver "scipy_slsqp" is not installed. Also, maybe you have forgotten to use "py
thon install" after updating OpenOpt from subversion repository

the transforming file related with py2exe is given as follows:

from distutils.core import setup
import py2exe
import sys
import os

import glob
if len(sys.argv) == 1:

opts = {
        'py2exe': {"compressed": 1, "optimize": 2,
                    "includes": [#"sip", "PyQt4._qt",
                                "numpy", "scipy", "scipy.optimize",

#"openopt.solvers.scipy_optim","openopt.solvers.BrasilOpt", "openopt.solvers.CoinOr","openopt.solvers.CVXOPT",
                 'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg','_fltkagg', '_gtk', '_gtkcairo', ],
                 'dll_excludes': ['libgdk-win32-2.0-0.dll','libgobject-2.0-0.dll'],


data_files = []

    # The first three parameters are not required, if at least a
    # 'version' is given, then a versioninfo resource is built from
    # them and added to the executables.
    options = opts,

    # targets to build
    console = [""],

what is going on?

Re: openopt with py2exe, bug??

I'm not an expert of py2exe. All I can suggest - try using latest openopt svn repository version, it doesn't use that has to be generated after "python install", maybe it is somehow related to the issue with py2exe. Or just wait till September 15 when a new OOSuite version is expected to be released.


Re: openopt with py2exe, bug??

Thanks for your advices! I will try.