2
$\begingroup$

I am trying to develop in python 3.10, and locally I have cplex 20.1.0.0 installed. It appears to me that the python interface cplex only supports python version 3.7 and 3.8. If I do a pip install from python 3.10, the cplex module uses the community version 22.1.1.0 to solve the model. Is there anyway that I can call cplex 20.1.0.0 from python 3.10?

$\endgroup$

1 Answer 1

3
$\begingroup$

No. This is not possible. You could check the detailed system requirements of CPLEX from this page. There is a pre-requisites tab after selecting the version and OS. There you would find the python compatibility:

https://www.ibm.com/support/pages/detailed-system-requirements-ibm-ilog-cplex-optimization-studio#2010

For CPLEX 20.1, python 3.7 and 3.8 are only supported.

$\endgroup$
3
  • $\begingroup$ is it possible to call the cplex executable by changing the path? It looks like the constraint programming module for docplex could call 20.1.0.0 with this approach $\endgroup$
    – TTY
    Commented May 6 at 12:05
  • $\begingroup$ @TTY Python modules using CPLEX means loading libraries using some ABI guarantees. You will lose those by swiching either your Python- or library version. See Python Docs. There is a reason numpy, scipy and co. is installed from different packages depending on your Python version (automatically during pip install). You don't want to debug potential issues with that! | Calling into a cplex executable (not lib) with serialized input (e.g. MPS) is something different but i don't think it applies to you. Summarized:Follow the reqs! $\endgroup$
    – sascha
    Commented May 6 at 17:49
  • $\begingroup$ @sascha Sure, since I only have comerical license for 20.1, I guess I have to stick with python 3.8 for now.. $\endgroup$
    – TTY
    Commented May 7 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.