[SciPy-user] openopt ImportError: cannot import name oovar

dmitrey dmitrey.kroshko@scipy....
Sun Oct 12 06:10:43 CDT 2008


Hi Nils,
try now.

as for the importing issue, maybe you updated svn from

svn/openopt/scikits/openopt/

while it is has to be from svn/openopt/

I'm not fond of the folders structure but it was demanded from all 
scikits (I don't know why less deeply structured folders were not 
organized, it brings lots of inconveniences).

Regards,D.


Nils Wagner wrote:
> On Sat, 11 Oct 2008 22:17:33 +0300
>   dmitrey <dmitrey.kroshko@scipy.org> wrote:
>   
>> I checked out openopt from svn and it works for me.
>> Does anyone else has the problem?
>>
>> D.
>>
>> Nils Wagner wrote:
>>     
>>> python -i 
>>> svn/openopt/scikits/openopt/examples/oofun/speedup.py
>>> Traceback (most recent call last):
>>>    File 
>>> "svn/openopt/scikits/openopt/examples/oofun/speedup.py", 
>>> line 28, in <module>
>>>      from scikits.openopt import NLP,  oofun,  oovar
>>> ImportError: cannot import name oovar
>>>
>>>       
>   
> Strange.
> I can import oovar on my old laptop (python2.4).
>
> Python 2.4 (#1, Oct 13 2006, 17:13:31)
> [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2
> Type "help", "copyright", "credits" or "license" for more 
> information.
>   
>>>> from scikits.openopt import oovar
>>>>               
>>>>         
>
> Another python2.4 issue is present
>
>   python -i 
> svn/openopt/scikits/openopt/examples/oofun/speedup.py
> Traceback (most recent call last):
>    File 
> "svn/openopt/scikits/openopt/examples/oofun/speedup.py", 
> line 38, in ?
>      r = p.solve(solver)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py", 
> line 201, in solve
>      return runProbSolver(self, *args, **kwargs)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/runProbSolver.py", 
> line 102, in runProbSolver
>      p.__prepare__()
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py", 
> line 385, in __prepare__
>      self.__construct_x_from_ooVars__()
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py", 
> line 370, in __construct_x_from_ooVars__
>      var.__initialize__(self)
>    File 
> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/ooVar.py", 
> line 63, in __initialize__
>      if any(self.lb > self.ub):
> NameError: global name 'any' is not defined
>
> Nils
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
>
>   



More information about the SciPy-user mailing list