embotech/ecos

using ecos_bb

Closed this issue · 5 comments

Hi,

I'm trying to use ecos_bb with cvxpy, and running into installation difficulties. It looks like ecos_bb is only on the origin/develop and origin/dev1.1.0 branches, neither of which has a setup.py file in the python folder. Installing from the egg in python/dist (and from cvxpy master), I get the following error:

Traceback (most recent call last):
File "ilp.py", line 4, in
from cvxpy import *
File "/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/init.py", line 24, in
from cvxpy.problems.problem import Problem
File "/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/problems/problem.py", line 27, in
from cvxpy.problems.solvers.utilities import SOLVERS
File "/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/problems/solvers/utilities.py", line 20, in
from cvxpy.problems.solvers.ecos_intf import ECOS
File "/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/problems/solvers/ecos_intf.py", line 23, in
import ecos
File "/Users/madeleine/anaconda/lib/python2.7/site-packages/ecos-1.0.5-py2.7-macosx-10.5-x86_64.egg/ecos.py", line 1, in
import _ecos
ImportError: dlopen(/Users/madeleine/anaconda/lib/python2.7/site-packages/ecos-1.0.5-py2.7-macosx-10.5-x86_64.egg/_ecos.so, 2): Symbol not found: _check_ctrlc
Referenced from: /Users/madeleine/anaconda/lib/python2.7/site-packages/ecos-1.0.5-py2.7-macosx-10.5-x86_64.egg/_ecos.so
Expected in: dynamic lookup

How should I try out the ecos_bb solver from python?

Thanks!
Madeleine

Hi Madeleine,

ecos_bb support for python is still experimental but if you would like to
try it out, checkout https://github.com/embotech/ecos-python, update the
submodule. Then run 'python setup.py build' followed by 'python setup.py
install'

Best,
Han

On Tue, Dec 16, 2014 at 4:06 PM, Madeleine Udell notifications@github.com
wrote:

Hi,

I'm trying to use ecos_bb with cvxpy, and running into installation
difficulties. It looks like ecos_bb is only on the origin/develop and
origin/dev1.1.0 branches, neither of which has a setup.py file in the
python folder. Installing from the egg in python/dist (and from cvxpy
master), I get the following error:

Traceback (most recent call last):
File "ilp.py", line 4, in
from cvxpy import *
File
"/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/
init.py", line 24, in
from cvxpy.problems.problem import Problem
File
"/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/problems/problem.py",
line 27, in
from cvxpy.problems.solvers.utilities import SOLVERS
File
"/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/problems/solvers/utilities.py",
line 20, in
from cvxpy.problems.solvers.ecos_intf import ECOS
File
"/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/problems/solvers/ecos_intf.py",
line 23, in
import ecos
File
"/Users/madeleine/anaconda/lib/python2.7/site-packages/ecos-1.0.5-py2.7-macosx-10.5-x86_64.egg/ecos.py",
line 1, in
import _ecos
ImportError:
dlopen(/Users/madeleine/anaconda/lib/python2.7/site-packages/ecos-1.0.5-py2.7-macosx-10.5-x86_64.egg/_ecos.so,
2): Symbol not found: _check_ctrlc
Referenced from:
/Users/madeleine/anaconda/lib/python2.7/site-packages/ecos-1.0.5-py2.7-macosx-10.5-x86_64.egg/_ecos.so
Expected in: dynamic lookup

How should I try out the ecos_bb solver from python?

Thanks!
Madeleine


Reply to this email directly or view it on GitHub
#99.

Great, thanks! That works.

For the sake other other seeking to do the same, the following worked for
me:

git clone https://github.com/embotech/ecos-python.git
cd ecos-python
git submodule init
git submodule update
python setup.py build
python setup.py install

I was then able to use ecos_bb with cvxpy by building cvxpy from master via
python setup.py install, and following the example in
cvxpy/tests/test_mip_vars.py.

On Tue, Dec 16, 2014 at 4:13 PM, Han Wang notifications@github.com wrote:

Hi Madeleine,

ecos_bb support for python is still experimental but if you would like to
try it out, checkout https://github.com/embotech/ecos-python, update the
submodule. Then run 'python setup.py build' followed by 'python setup.py
install'

Best,
Han

On Tue, Dec 16, 2014 at 4:06 PM, Madeleine Udell notifications@github.com

wrote:

Hi,

I'm trying to use ecos_bb with cvxpy, and running into installation
difficulties. It looks like ecos_bb is only on the origin/develop and
origin/dev1.1.0 branches, neither of which has a setup.py file in the
python folder. Installing from the egg in python/dist (and from cvxpy
master), I get the following error:

Traceback (most recent call last):
File "ilp.py", line 4, in
from cvxpy import *
File

"/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/

init.py", line 24, in
from cvxpy.problems.problem import Problem
File

"/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/problems/problem.py",

line 27, in
from cvxpy.problems.solvers.utilities import SOLVERS
File

"/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/problems/solvers/utilities.py",

line 20, in
from cvxpy.problems.solvers.ecos_intf import ECOS
File

"/Users/madeleine/anaconda/lib/python2.7/site-packages/cvxpy-0.2.15-py2.7.egg/cvxpy/problems/solvers/ecos_intf.py",

line 23, in
import ecos
File

"/Users/madeleine/anaconda/lib/python2.7/site-packages/ecos-1.0.5-py2.7-macosx-10.5-x86_64.egg/ecos.py",

line 1, in
import _ecos
ImportError:

dlopen(/Users/madeleine/anaconda/lib/python2.7/site-packages/ecos-1.0.5-py2.7-macosx-10.5-x86_64.egg/_ecos.so,

2): Symbol not found: _check_ctrlc
Referenced from:

/Users/madeleine/anaconda/lib/python2.7/site-packages/ecos-1.0.5-py2.7-macosx-10.5-x86_64.egg/_ecos.so

Expected in: dynamic lookup

How should I try out the ecos_bb solver from python?

Thanks!
Madeleine


Reply to this email directly or view it on GitHub
#99.


Reply to this email directly or view it on GitHub
#99 (comment).

Madeleine Udell
PhD Candidate in Computational and Mathematical Engineering
Stanford University
www.stanford.edu/~udell

@madeleineudell Thanks! Before reading your recipe, I'd been on a doomed mission to install from https://github.com/embotech/ecos/tree/master/python. Maybe a warning could be added to the readme in that directory...

We will do that with v1.1.0, where the python directory will cease to exist in the ecos repo. Sorry for the inconvenience at this point!

And thanks Madeleine for the fantastic recipe!