Wednesday, October 20, 2010

CPLEX Installation with Python on CentOS

Following up on this blog entry Free Full version of ILOG Optimization products via IBM's Academic Initiative Program

1. After getting the necessary software and license from IBM Academic Initiative, you should install the CPLEX binary

# ./cplex_studio122.acad.linux-x86.bin

2. For the license file, make use your license file name is "access.ilm" (without the quotation)

3. Create a folder to house the license. CPLEX needs this folder to be present
# mkdir -p /usr/ilog/ilm
# mv access.ilm /usr/ilog/ilm

4. You should be able to run your CPLEX now. To verify, go to the CPLEX binary folder and run it. In my case
# /usr/local/cplex_studio_122/cplex/bin/x86-64_sles10.4.1/cplex

5. To install the Python API of CPLEX, do read up on IBM iLOG Optimization Studio Documentation
# cd /usr/local/cplex_studio_122/cplex/python/x86-64_sles10_4.1/
# python setup.py install --home ./cplex/

You will need to add the path to your PYTHONPATH by running
export PYTHONPATH=$PYTHONPATH:/usr/local/cplex_studio_v12/cplex/python/x86-64_sles10_4.1

No comments: