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?
$\begingroup$
$\endgroup$
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
3
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:
For CPLEX 20.1, python 3.7 and 3.8 are only supported.
-
$\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$– TTYCommented 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$– saschaCommented 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$– TTYCommented May 7 at 3:36