[Ipopt] ipopt with python

Amit Aides amitibo at campus.technion.ac.il
Sun Nov 23 04:56:31 EST 2014


Hi,

I commited a new version of 'cyipot' where I cleaned the setup.py file. 
I have tested it on a similar ubuntu platform. To test it yourself, you 
need to clone the latest version from:
https://bitbucket.org/amitibo/cyipopt/ (I am yet to update the download 
file). Note that you will need to install ipopt system wide (for example 
in /usr/local) or else the python setup.py script will not find its 
package configuration file.

Best,
Amit

On 21/11/2014 17:52, Vyacheslav Kungurtsev wrote:
> OK. I tried this, but the error from pyipopt remains.
>
> Thanks
> ~Vyacheslav
>
> On Fri, Nov 21, 2014 at 4:44 PM, Tony Kelman <kelman at berkeley.edu 
> <mailto:kelman at berkeley.edu>> wrote:
>
>     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.
>     -Tony
>     *From:* Vyacheslav Kungurtsev
>     <mailto:vyacheslav.kungurtsev at esat.kuleuven.be>
>     *Sent:* Friday, November 21, 2014 7:32 AM
>     *To:* Tony Kelman <mailto:kelman at berkeley.edu>
>     *Cc:* ipopt at list.coin-or.org <mailto:ipopt at list.coin-or.org>
>     *Subject:* ipopt with python
>     Hello,
>
>     Somehow after the weekend I tried again and ipopt installed just
>     fine and the examples ran OK. I have no idea what happened.
>
>
>
>     Now I am trying to run ipopt with python, and having trouble with
>     both pyipopt and cyipopt
>
>     With pyipopt:
>
>
>     the error appears as:
>
>     ~/pyipopt/examples$ python hs071.py
>     Traceback (most recent call last):
>       File "hs071.py", line 6, in <module>
>         import pyipopt
>       File "/usr/local/lib/python2.7/
>     dist-packages/pyipopt/__init__.py", line 16, in <module>
>         from pyipoptcore import *
>     ImportError:
>     /usr/local/lib/python2.7/dist-packages/pyipopt/pyipoptcore.so:
>     undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
>
>
>     Indeed, it so happens that:
>
>     $ nm /usr/local/lib/python2.7/dist-
>     packages/pyipopt/pyipoptcore.so | grep
>     _ZTVN10__cxxabiv117__class_type_infoE
>                      U _ZTVN10__cxxabiv117__class_type_infoE
>
>
>     the symbol arises from libstdc++ and I have tried adding it to
>     setup.py as such:
>             extra_link_args=['-libstdc++']
>     ,
>
>     or
>
>             extra_link_args=['-libstdc++', + IPOPT_LIB],
>
>     or
>
>             libraries=[
>     ...
>                 'coinmetis','libstdc++',
>     ...
>
>     and in all cases setup.py installs with no error, but the import
>     error remains when I try to run the example.
>
>     Do you have any suggestions? Am I linking it improperly in the
>     setup file?
>
>     With cyipopt the setup.py requires:
>     these
>         IPOPT_ICLUDE_DIRS=['include_mt/coin', np.get_include()]
>         IPOPT_LIBS=['Ipopt39', 'IpoptFSS']
>         IPOPT_LIB_DIRS=['lib_mt/x64/release']
>         IPOPT_DLL=['Ipopt39.dll', 'IpoptFSS39.dll']
>     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?
>
>     Sorry if the question is rather basic.
>
>
>     some info about my computer, if it helps:
>     Ubuntu 14.04
>     gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
>     g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
>
>
>
>
>     Thank you
>
>
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20141123/ae7797ab/attachment.html>


More information about the Ipopt mailing list