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 'nlp1.py'. 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\nlp1.py", line 75, in <module>
isPassed, r, p = test(iprint= 10, plot=0)
File "I:\WORK2010\text\nlp1.py", 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 setup.py 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:
sys.argv.append("py2exe")
sys.argv.append("-q")
opts = {
'py2exe': {"compressed": 1, "optimize": 2,
"includes": [#"sip", "PyQt4._qt",
"numpy", "scipy", "scipy.optimize",
#"openopt",
#"openopt.kernel",
#"openopt.solvers",
#"openopt.solvers.scipy_optim","openopt.solvers.BrasilOpt", "openopt.solvers.CoinOr","openopt.solvers.CVXOPT",
#"openopt.solvers.nlopt","openopt.solvers.Standalone","openopt.solvers.UkrOpt","openopt.solvers.scipy_optim.scipy_slsqp_oo,
],
'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg','_fltkagg', '_gtk', '_gtkcairo', ],
'dll_excludes': ['libgdk-win32-2.0-0.dll','libgobject-2.0-0.dll'],
'dist_dir':'I:\\WORK2010\\text\\dist',
}
}
data_files = []
setup(
# 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,
data_files=data_files,
# targets to build
console = ["nlp1.py"],
)
what is going on?