0

I am using python 3.6 version and CPLEX 12.10 in MAC with Anaconda. How do I access the cplex libraries for python? I have an academic version installed in my MAC and can be used independently in GUI.

2 Answers2

0

as said in http://ibmdecisionoptimization.github.io/docplex-doc/mp/getting_started_python.html

conda install -c ibmdecisionoptimization docplex

should help

Alex Fleischer
  • 9,276
  • 2
  • 12
  • 15
  • Will docplex take the academic version? I did this and it showed the error of promotion version. I already have academic initiative CPLEX installed in my mac. – Kaveri Kala Nov 17 '20 at 14:22
0

What do you want to use ? There are the CPLEX python api which is a python API to the matrix interface of CPLEX - And there is docplex, which is the object oriented modeling layer based on CPLEX.

In anycase, if running a solve showed the error of promotional version, then it means that somehow you installed the cplex package in the past.

Before you start, please open a Terminal console and make sure it is setup to use your installation of Anaconda, and that your conda environment is activated (if you use one).

First you want to install whatever cplex was installed using conda uninstall cplex if you installed using conda or pip uninstall cplex if you were using pip.

Then you have a choice. Either you add $CPLEX_STUDIO_DIR1210/cplex/python/3.6/x86-64_osx to your PYTHONPATH or you install the CPLEX python wrappers:

$ cd $CPLEX_STUDIO_DIR1210/cplex/python/3.6/x86-64_osx
$ python setup.py install