python 2.7 - error happens during installation of pyipopt in Ubuntu 12.04 -
having installed ipopt , trying install pyipopt in ubuntu 12.04 box, encountered following error:
python setup.py install
results in 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 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 exit status 1
ideas ?
this interface ipopt library required compile. stated in setup.py
file
# have edit file in unpredictable ways # if want pyipopt work you, sorry.
the easiest way handle adjust setup.py
accordingly:
# when installed ipopt source, used # --prefix=/usr/local # option, want pyipopt ipopt installation. # installed source because ipopt packaging # linux distribution buggy, # time read bugs have been fixed # , want specify different directory here. ipopt_dir = '/usr/local/'
adjust ipopt_dir
path library has been installed on system, of course should has been conducted anyway.
edit: if installing source, use --prefix=/usr/local
configure script , compile , install library running make; sudo make install
. don't have change setup.py file.
Comments
Post a Comment