Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Which version of python do i need?

    Posted 10/26/16 05:30 AM

    Originally posted by: Remsse


    Hi,

    I'm trying to run Cplex from python. 

    I started to install the cplex_studio1263.win-x86-32 version then i tried to run the script setuy.py  as explained here: http://www.ibm.com/support/knowledgecenter/SSSA5P_12.5.1/ilog.odms.cplex.help/CPLEX/GettingStarted/topics/set_up/Python_setup.html

     

    but when i try the command line import cplex seen here http://www.ibm.com/support/knowledgecenter/fr/SSSA5P_12.6.1/ilog.odms.cplex.help/CPLEX/GettingStarted/topics/tutorials/Python/module.html

    I get the following error: 

     

    Traceback (most recent call last):
      File "<pyshell#0>", line 1, in <module>
        import cplex
    .

    .

    .
      File "C:\Program Files (x86)\IBM\ILOG\CPLEX_Studio1263\cplex\python\3.4\x86_win32\cplex\_internal\_pycplex_platform.py", line 25, in <module>
        raise Exception(ERROR_STRING)
    Exception: CPLEX 12.6.3.0 is not compatible with this version of Python.

     

    I just downloaded the latest version of python, tried both 32 and 64bit. Now i'm not good at programming and don't see what could be the problem here. 

     

    Thank you for your time, and i hope your help

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Which version of python do i need?

    Posted 10/26/16 11:44 AM

    It looks like you have installed the 32-bit version of CPLEX 12.6.3 on Windows (i.e., from cplex_studio1263.win-x86-32).  You'll need to use a 32-bit version of either Python 2.7.x or Python 3.4.x.  From your error above, it looks like you were trying the Python 3.4 version of the API:

    "C:\Program Files (x86)\IBM\ILOG\CPLEX_Studio1263\cplex\python\3.4\x86_win32\cplex\_internal\_pycplex_platform.py"

    The Python 2.7 version of the API should be here (based on the same path):

    "C:\Program Files (x86)\IBM\ILOG\CPLEX_Studio1263\cplex\python\2.7\x86_win32\"

    If you have multiple Python's installed on your machine you have to be careful that you're using the right one.

    You can find the detailed system requirements here.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Which version of python do i need?

    Posted 10/27/16 03:49 AM

    Originally posted by: Remsse


    My problem was indeed that i used the 3.5 version of Python. 

    I thought it would be fine with the latest version. I reinstalled the 3.4 version and ot's fine now. 

     

    Thank you

     

     


    #CPLEXOptimizers
    #DecisionOptimization