Howto install and use lp_solve and its Python extension module as non root on Linux?

Compile and install the lp_solve shared library:

  • Download lp_solve_5.5.0.10_source.tar.gz from SourceForge and untar so you get a directory lp_solve_5.5 with contents.

  • Enter directory lp_solve_5.5/lpsolve55 and excecute

    sh ccc

    to compile the lpsolve library

  • Move the shared library to ~/usr/lib/.

  • Declare the environment variable LD_LIBRARY_PATH with

    export LD_LIBRARY_PATH=~/usr/lib/

    in .bashrc or .profile or something.

Install the Python module

  • Download lp_solve_5.5.0.10_Python_source.tar.gz from SourceForge and untar, which will create lp_solve_5.5/extra/Python inside the previously created directory.

  • Enter directory lp_solve_5.5/extra/Python and compile and install with

    python install --prefix=~/usr/