Error: CVXOPT might not be installed - windows

41 views
Skip to first unread message

cfriedalek

unread,
Sep 13, 2008, 7:04:27 AM9/13/08
to CVXOPT
Hi,

I'm trying to get CVXOPT working with OpenOffice. When I enter the
details for the first example in the user guide I get the message
"Error: CVXOPT might not be installed" in the =CLP(...) cell. Problem
is the CVXOPT is installed and functioning properly as far as I can
tell.

I have a clean installation of python 2.5.2, cvxopt-1.0.win32-
py2.5.exe, and cvxopt-OOo-plugin-1.0.zip and OO 2.4.1 running on
WIndows XP Pro SP2 (32 bit). I have successfully run a few examples in
a python or ipython shell. Open Office shows the plugin as installed
and enabled (cvxopt.py, types.rdb)

Seems like the failure occurs in cvxopt.py:

try:
from cvxopt.base import matrix, sqrt, log, exp
from cvxopt import solvers, info
CVXOPT_INSTALLED = True
except:
CVXOPT_INSTALLED = False

def check_cvxopt_inst():

if not CVXOPT_INSTALLED:
return "Error: CVXOPT might not be installed"
.....


check_cvxopt_inst is called for each access to the class methods such
as CLP. Clearly CVXOPT_INSTALLED is not True but if I try the import
functions from a python shell they work.

I am not familiar with Open Office. Seems like it doesn't know about
my python 2.5 installation.

Any ideas what I can do?

Joachim Dahl

unread,
Sep 13, 2008, 9:23:58 AM9/13/08
to cvx...@googlegroups.com
Unfortunately we haven't been able to test the plugin under Windows or Mac OS.
It's mentioned somewhere in the OO documentation for python that python programs
must be installed within the local python version included with OO,  but that's
not true for the Debian and Ubuntu version we've tested.   Perhaps you need to
install CVXOPT somewhere within the OpenOffice folders under Windows (by
manually copying the CVXOPT installation files to a new folder)?  Of course, 
then there's a good chance that the Python versions don't match (and we don't
support Python < 2.4).

Please keep us updated on any discoveries you make.

best regards
joachim

cfriedalek

unread,
Sep 14, 2008, 8:32:57 AM9/14/08
to CVXOPT
Ok, after a lot of browsing it seems that a python2.5 build of PyUNO
is still not available, so I can't run this on Windows natively.

However, finally, I discovered Virtualbox (2.0) and installed Ubuntu
8.0.4 as a guest sytem on Windows XP. Also found this gem on this
forum sudo apt-get build-dep python-cvxopt So now I have a working
(virtual) Ubuntu/CVXOPT system on Windows XP. Downloaded and installed
the cvxopt-plugin and it worked.

Still new to Ubuntu so I'm not sure how to check which version of
cvxopt I have but this is a great, seamless workaround in the
meantime.

Thanks for your help.

On Sep 13, 11:23 pm, "Joachim Dahl" <dahl.joac...@gmail.com> wrote:
> Unfortunately we haven't been able to test the plugin under Windows or Mac
> OS.
> It's mentioned somewhere in the OO documentation for python that python
> programs
> must be installed within the local python version included with OO,  but
> that's
> not true for the Debian and Ubuntu version we've tested.   Perhaps you need
> to
> install CVXOPT somewhere within the OpenOffice folders under Windows (by
> manually copying the CVXOPT installation files to a new folder)?  Of
> course,
> then there's a good chance that the Python versions don't match (and we
> don't
> support Python < 2.4).
>
> Please keep us updated on any discoveries you make.
>
> best regards
> joachim
>

Joachim Dahl

unread,
Sep 14, 2008, 10:06:33 AM9/14/08
to cvx...@googlegroups.com
I am glad to hear you made progress...  

You can check the version of CVXOPT by:
>>> from cvxopt import info
>>> info.version
'1.0'

The default version of python-cvxopt in Ubuntu 8.04 is 0.93,  so you need to manually
install the latest version 1.0.  I just checked,  and I think there's a typo in the version check
for the Openoffice plugin,  telling you to upgrade to 0.9.3;  that should be 1.0.  The
version should be correct, however, it's just the error-message that's wrong.

We will soon release a new version of CVXOPT,  so I will postpone fixing this typo until then.

Now that you have Ubuntu installed, building CVXOPT from scratch should be straightforward.
Ideally,  you only need to do the following after downloading and extracting the source:
$ sudo python setup.py install

Joachim
Reply all
Reply to author
Forward
0 new messages