Decision Optimization

 View Only
  • 1.  Cplex version compatibility with python?

    Posted Wed August 11, 2021 11:16 AM
    Hi,

    I have an older cplex licensed version which is 12.6.3. I am modelling using docplex and getting the error saying "cplex version is not compatible with python version". I tried with python 2.7 and 3.x as well. still the same error? Is cplex 12.6.3 not compatible with python?

    Which cplex version should I buy to be able to work with latest of the python versions?






    Thanks,
    Shah

    ------------------------------
    ayshan shah
    ------------------------------

    #DecisionOptimization


  • 2.  RE: Cplex version compatibility with python?

    Posted Thu August 12, 2021 04:12 AM
    CPLEX supports some Python version depending on its version.
    docplex supports some versions of CPLEX: in general the last 2 cplex versions at the moment of the release.

    So the easiest is to pull current version of docplex and use either 12.10 or 20.1. With a python 3.6 or 3.7.

    If you need to stick to some older version of CPLEX, then you will need to get an old version of docplex, but at the cost of lack of bug fixes, improvements and engine api coeverage.

    ------------------------------
    Vincent Beraudier
    ------------------------------



  • 3.  RE: Cplex version compatibility with python?

    Posted Thu August 12, 2021 04:22 AM
    Thanks for the response Vincent. Completely got ur point.

    This is the error I'm getting "CPLEX 12.6.3.0 is not compatible with this version of Python."

    Python version is 2.7 here. I installed python 2.7 as the CPLEX version is 12.6.3 which is very old now.

    Given that I have 12.6.3, which python version I can use to be able to work and not get the compatibility error ? 


    Shah

    ------------------------------
    Shah
    ------------------------------



  • 4.  RE: Cplex version compatibility with python?

    Posted Thu August 12, 2021 07:36 AM
    My guess is that you are on Linux? CPLEX python package is supported only on 2.6 and 3.4 which would explain the error with 2.7.
    Indeed, this error comes from CPLEX not docplex and indicates that CPLEX was not able to load the shared lib.

    If you want to use 12.6.3 with docplex, I would recommend that you go for 3.4 python.
    At the time docplex was released for 12.6.x, it supported only python 2.7 and 3.4, so would get an error with the cplex package.

    I would say that you should use
    Python 3.4
    CPLEX package for 3.4 in a clean environment
    go for https://pypi.org/project/docplex/2.0.15/ version which should match it all.

    This should be a correct configuration.

    Note that 12.6.3 is not actively maintained so if you encounter any issue, we will ask you to upgrade.

    ------------------------------
    Vincent Beraudier
    ------------------------------



  • 5.  RE: Cplex version compatibility with python?

    Posted Thu August 12, 2021 06:35 PM
    Apologies I missed to mention that I was trying to install in windows --




    Regards,
    Shahul
    +91-9746145474