Hi everyone,
I thought it might be helpful for others to share a guide on how to install the CPLEX solver locally, because the installation is not that straightforward actually.
- Set up a virtual environment, as explained here hpc:applications_and_libraries [eResearch Doc]
virtualenv ~/baobab_python_env
-
Download the academic version of CPLEX here: Site. → “Software” → " ILOG CPLEX Optimization Studio" → “Download”. You have to be logged in to your IBM account in order to see the “Download” button. Select HTTP method to download the Linux version (e.g., IBM ILOG CPLEX Optimization Studio V22.1.0 for Linux x86-64).
-
Activate the Python virtual environment
. ~/baobab_python_env/bin/activate
- Move the CPLEX file that you downloaded to your home directory and install it by typing this command
sh cplex_studio1263.linux-x86-64.bin
-
Follow the instructions. Do not install CPLEX in the default location, but rather specify it to your home folder (e.g., /home/YOUR_USER_NAME_HERE/opt/ibm/ILOG/CPLEX_Studio221)
-
When the installation is complete, install the Python bindings by entering this command (remember to have your virtual environment activated!):
python /home/YOUR_USER_NAME_HERE/opt/ibm/ILOG/CPLEX_Studio221/python/setup.py install
- Done!
Cheers, Jan