Instructions for installing lp_solve and using its Python wrapper are online. However, I ran into a few issues while installing on Mac OS X (using the documentation's installation instructions found here, http://web.mit.edu/lpsolve/doc/Python.htm). I have written up the steps I followed. Download files https://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.2.3/ You will need three downloads. Unzip the following files into a directory with name following the arrow. lp_solve_5.5.2.3_dev_[YOUR OS] —> lpsolve_dev lp_solve_5.5.2.3_Python_[YOUR OS] —> lpsolve_python lp_solve_5.5.2.3_source.tar.gz or lp_solve_5.5.2.3_exe_win64.zip —> lpsolve_main STEP ONE ``` cd lpsove_main/lpsolve55 sh ccc.osx (or the appropriate extension) ``` You may have warnings. This is okay. Just ignore them. This creates two files in lpsolve_main/lpsolve55/bin/[YOUR OS] STEP TWO You will need to copy lpsolve_main/lpsolve55/bin/osx64/liblpsolve55.a and liblpsolve55.dylib to a lib directory Python will find. For example, /usr/lib/ for system Python, ~/anaconda2/lib/ for Anaconda Python, etc. For system Python, this looks like ``` cp lpsolve_main/lpsolve55/bin/osx64/liblpsolve55.* /usr/lib ``` STEP THREE In lpsolve_python, you will see exactly one folder, extra. Copy this to lpsolve_main. For example, ``` mv lpsolve_python/extra lpsolve_main ``` STEP FOUR Go to lpsolve_main/extra/Python. (a) EDIT setup.py You may need to change line 18 or line 21 and set the LPSOLVE55 variable to the right folder. For example, for mac osx64, lines 16-18 would look like ``` 16 if windir == None: 17 WIN32 = 'NOWIN32' 18 LPSOLVE55 = '../../lpsolve55/bin/osx64’ ``` (b) OS X users will have to modify extra/Python/hash.c Comment out the #include line at the top of the file. ------------------------------------------------------------------------------------ ALTERNATIVELY, YOU CAN JUST USE THE C VERSION FROM THE COMMAND LINE AND WRITE YOUR OWN INPUT FILES To do this, you only need the LAST download. Go to lpsolve_main/lp_solve/ Run sh ccc.osx (or the ccc file for your OS) Then in lpsolve_main/lp_solve/bin/osx64/, you will find an executable called lp_solve.