<div dir="ltr"><div>Here are a few notes on installing cyipopt on Ubuntu:<br><br><a href="http://www.moorepants.info/notebook/notebook-2014-07-01.html">http://www.moorepants.info/notebook/notebook-2014-07-01.html</a><br><br></div>I modified the cyipopt setup.py a bit for linux. My branch is here: <a href="https://bitbucket.org/moorepants/cyipopt">https://bitbucket.org/moorepants/cyipopt</a><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><br>Jason<br><a href="http://moorepants.info" target="_blank">moorepants.info</a><br><span>+01 530-601-9791</span><br></div></div></div>
<br><div class="gmail_quote">On Fri, Nov 21, 2014 at 10:52 AM, Vyacheslav Kungurtsev <span dir="ltr"><<a href="mailto:vyacheslav.kungurtsev@esat.kuleuven.be" target="_blank">vyacheslav.kungurtsev@esat.kuleuven.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>OK. I tried this, but the error from pyipopt remains.<br><br></div>Thanks<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">~Vyacheslav<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 21, 2014 at 4:44 PM, Tony Kelman <span dir="ltr"><<a href="mailto:kelman@berkeley.edu" target="_blank">kelman@berkeley.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="FONT-SIZE:12pt;FONT-FAMILY:'Calibri';COLOR:#000000">
<div>I don’t know the Python interfaces to Ipopt very well. One thing you might
try is configuring Ipopt with --enable-dependency-linking, I think that can be
necessary to dlopen Ipopt shared libraries including their dependencies from
Python or Julia or other languages. You won’t have dll’s on Ubuntu, you’ll have
.so shared libraries.</div>
<div> </div>
<div>-Tony</div>
<div> </div>
<div style="FONT-SIZE:small;TEXT-DECORATION:none;FONT-FAMILY:"Calibri";FONT-WEIGHT:normal;COLOR:#000000;FONT-STYLE:normal;DISPLAY:inline">
<div style="FONT:10pt tahoma">
<div> </div>
<div style="BACKGROUND:#f5f5f5">
<div><b>From:</b> <a title="vyacheslav.kungurtsev@esat.kuleuven.be" href="mailto:vyacheslav.kungurtsev@esat.kuleuven.be" target="_blank">Vyacheslav Kungurtsev</a>
</div>
<div><b>Sent:</b> Friday, November 21, 2014 7:32 AM</div>
<div><b>To:</b> <a title="kelman@berkeley.edu" href="mailto:kelman@berkeley.edu" target="_blank">Tony Kelman</a> </div>
<div><b>Cc:</b> <a title="ipopt@list.coin-or.org" href="mailto:ipopt@list.coin-or.org" target="_blank">ipopt@list.coin-or.org</a> </div>
<div><b>Subject:</b> ipopt with python</div></div></div>
<div> </div></div><div><div>
<div style="FONT-SIZE:small;TEXT-DECORATION:none;FONT-FAMILY:"Calibri";FONT-WEIGHT:normal;COLOR:#000000;FONT-STYLE:normal;DISPLAY:inline">
<div dir="ltr">
<div>
<div>Hello,<br><br></div>
<div>Somehow after the weekend I tried again and ipopt installed just fine and
the examples ran OK. I have no idea what happened.<br><br><br><br></div>
<div>Now I am trying to run ipopt with python, and having trouble with both
pyipopt and cyipopt<br><br>With pyipopt:<br><br><br>the error appears
as:<br><br>~/pyipopt/examples$ python hs071.py<br>Traceback (most recent call
last):<br> File "hs071.py", line 6, in
<module><br> import pyipopt<br> File
"/usr/local/lib/python2.7/
<div>dist-packages/pyipopt/__init__.py", line 16, in
<module><br> from pyipoptcore import *<br>ImportError:
/usr/local/lib/python2.7/dist-packages/pyipopt/pyipoptcore.so: undefined symbol:
_ZTVN10__cxxabiv117__class_type_infoE<br><br><br></div>Indeed, it so happens
that:<br><br>$ nm /usr/local/lib/python2.7/dist-
<div>packages/pyipopt/pyipoptcore.so | grep
_ZTVN10__cxxabiv117__class_type_infoE<br>
U _ZTVN10__cxxabiv117__class_type_infoE<br><br><br></div>the symbol arises from
libstdc++ and I have tried adding it to setup.py as
such:<br>
extra_link_args=['-libstdc++']
<div>, <br><br></div>or<br><br>
extra_link_args=['-libstdc++', + IPOPT_LIB],
<br><br>or<br><br> libraries=[
<br>...<br>
'coinmetis','libstdc++',<br>
<div>...<br><br></div>
<div>and in all cases setup.py installs with no error, but the import error
remains when I try to run the example. <br><br></div>Do you have any
suggestions? Am I linking it improperly in the setup file?<br><br></div>
<div> </div>
<div> </div>
<div>With cyipopt the setup.py requires:<br>these<br>
IPOPT_ICLUDE_DIRS=['include_mt/coin', np.get_include()]<br>
IPOPT_LIBS=['Ipopt39', 'IpoptFSS']<br>
IPOPT_LIB_DIRS=['lib_mt/x64/release']<br>
IPOPT_DLL=['Ipopt39.dll', 'IpoptFSS39.dll']<br></div>
<div>to be set correctly. I am not quite sure how to find the proper
directories. Would I even have dll files given that I am running
ubuntu?<br><br></div>
<div>Sorry if the question is rather basic. <br></div>
<div><br><br>some info about my computer, if it helps:<br></div>Ubuntu
14.04<br>gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2<br>g++ (Ubuntu 4.8.2-19ubuntu1)
4.8.2<br><br><br><br><br></div>
<div>Thank you<br><br></div>
<div class="gmail_extra">
<div> </div></div></div></div></div></div></div></div></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
<br></blockquote></div><br></div>