1
votes

having installed IPOPT and trying to install pyipopt in Ubuntu 12.04 box, I encountered the following error:
python setup.py install
results in the following error:
running install
running build
running build_py
running build_ext
building 'pyipoptcore' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include/coin/ -I/usr/include/python2.7 -c src/callback.c -o build/temp.linux-x86_64-2.7/src/callback.o In file included from src/callback.c:36:0: src/hook.h:5:29: fatal error: IpStdCInterface.h: No such file or directory compilation terminated.
error: command 'gcc' failed with exit status 1
any ideas ?

1

1 Answers

1
votes

this is the interface for the ipopt library which is required to compile. as stated in the setup.py file

# You will probably have to edit this file in unpredictable ways
# if you want pyipopt to work for you, sorry.

the easiest way to handle this is to adjust the setup.py accordingly:

# When I installed Ipopt from source, I used the
# --prefix=/usr/local
# option, so this is where I want pyipopt to look for my ipopt installation.
# I only installed from source because the ipopt packaging
# for my linux distribution was buggy,
# so by the time you read this the bugs have probably been fixed
# and you will want to specify a different directory here.
IPOPT_DIR = '/usr/local/'

adjust IPOPT_DIR to the path where the library has been installed on your system, which of course should has been conducted anyway.

EDIT: If you are installing from source, just use --prefix=/usr/local for the configure script and compile and install the library by running make; sudo make install. Then you don't have to change the setup.py file.