0

Read other questions; unfortunately they were not relevant.

Using this tutorial: http://lpsolve.sourceforge.net/5.5/Python.htm

Found this file: lp_solve_5.5.2.0_exe_ux32

That contains these files:

  1. libbfp_etaPFI.so
  2. libbfp_GLPK.so
  3. libbfp_LUSOL.so
  4. libxli_CPLEX.so
  5. libxli_DIMACS.so
  6. libxli_LINDO.so
  7. libxli_MathProg.so
  8. libxli_XPRESS.so
  9. libxli_ZIMPL.so
  10. lp_solve

The tutorial says the need file is: lpsolve55.so

How do you get lpsolve working with Python in Ubuntu?

AturSams
  • 7,568
  • 18
  • 64
  • 98

2 Answers2

1

This is for installing lpsolve55 in Python, anaconda in ubuntu distribution, translated from the blogpost (which is in Chinese)

  1. go download at sourceforge

    lp_solve_5.5.0.20_dev.tar.gz - where you would find liblpsolve55.so and some other files
    lp_solve_5.5.0.20_Python_source.tar.gz - where you would find lpsolve55.so and setup.py

  2. make sure you have install python-dev (if not, type sudo apt-get install python-dev at the command line)

  3. unzip lp_solve_5.5.0.20_Python_source.tar.gz and put the file at anaconda2/lib/python2.7/site-packages/

  4. unzip lp_solve_5.5.0.20_dev.tar.gz and put "only" the liblpsolve55.so at anaconda2/lib, and the rest at anaconda2/lib/python2.7/site-packages/lp_solve_5.5, the directory you get at step 3, in the same layer as extra. The result would look like this

  5. Now

    $ cd anaconda2/lib/python2.7/site-packages/lp_solve_5.5/extra/Python/
    $ python setup.py install

  6. Test by import lpsolve55

Tai
  • 7,684
  • 3
  • 29
  • 49
0

You will need this file: lp_solve_5.5.2.0_Python2.5_exe_ux64.tar.gz

Inside it you will find: liblpsolve55.so

You need to put that file in a place accessible to the python path. Had problems doing that so it's in the project's folder.

You also need this file: lp_solve_5.5.2.0_dev_ux64.tar.gz

Inside it you will find: liblpsolve55.so

This file needs to go to /lib/usr

AturSams
  • 7,568
  • 18
  • 64
  • 98