installing the CPLEX solver for Cobarpy usage

473 views
Skip to first unread message

Alon Ginatt

unread,
Apr 4, 2021, 3:06:33 AM4/4/21
to cobra pie
Hi all,

I'm getting familiar with cobrapy, (working over whole genome models), and got the following error when attempting to summarize one:

SolverError: CPLEX Error 1016: Community Edition. Problem size limits exceeded. Purchase at http://ibm.biz/error1016.

I'm pretty sure I'm using the full IBM academic version of ILOG/CPLEX, but I may be mistaken, or maybe have done something wrong during the installation of cobrapy, or the setting of CPLEX. Not sure how to fix this. 

Your help will be much appreciated regarding the this issue! 

Best,
Alon


Dan Olson

unread,
Apr 5, 2021, 9:32:38 AM4/5/21
to cobra pie
I've run into this problem before. You've got both versions of CPLEX installed, and cobrapy is not finding the right one. Here's what I did.
1. In the conda environment where cobrapy is running, type "cplex" at the command prompt. That will show you which version of CPLEX your environment has access to, so you can know when you've fixed the problem.
2. Then navigate to the cplex installation directory and run "python setup.py install" (Detailed instructions here https://www.ibm.com/docs/en/icos/12.8.0.0?topic=cplex-setting-up-python-api)
3. Then type "cplex" at the command prompt again. You should see that you're accessing the full version of the solver.

-Dan
Reply all
Reply to author
Forward
0 new messages