Installation of NLopt python module for Linux
- Install SWIG (follow instructions: http://swig.org/svn.html)
- cd ~
- git clone https://github.com/swig/swig.git
- cd swig
- ./autogen.sh ( sudo apt-get install automake [if aclocal not found])
- ./configure --prefix=<absolute path to current dir> --without-pcre
- make
- sudo apt-get install bison -y && sudo apt-get install byacc -y [if yacc not found]
- make install
- export PATH=$PATH:~/swig
- Install NLopt: (follow instructions: https://github.com/stevengj/nlopt)
- git clone https://github.com/stevengj/nlopt.git
- cd nlopt
- mkdir build
- cd build
- cmake -DPYTHON_EXECUTABLE=/usr/bin/python3.6 ..
- make
- sudo make install
Note: copy the nlopt.py and _nlopt.so files to the desired dist-packages
No comments:
Post a Comment