Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Problem with upgrade the docplex

    Posted Mon March 03, 2025 10:55 AM

    Hi,

    I want to upgrade my docplex to access the unlimited academic version in python. And this is my downloaded version and its corresponding folder E:\Program Files\IBM\ILOG\CPLEX_Studio2212

    And I want to follow Setting up the Python API of CPLEX - IBM Documentation , But I found there is no setup.py in E:\Program Files\IBM\ILOG\CPLEX_Studio2212\cplex. 

    So I saw the file readmeWindows.html and It said:

    The CPLEX Python interface is no longer delivered inside CPLEX Optimization Studio, but can be installed directly from PyPI or from Anaconda, using the commands

      pip install cplex (conda install cplex for Anaconda)
      pip install docplex (conda install docplex for Anaconda)
    

    The first command installs the Community Edition CPLEX and CP Optimizer runtimes as well as a low-level Python interface to CPLEX. The second installs the higher-level "docplex" Python package which includes CPLEX and CP Optimizer modelling and solving support. The Community Edition runtimes which come as standard are limited in the size of optimization problems that they can solve. To upgrade the Community Edition runtimes and remove size limitations, use the command "docplex" which was installed when you installed the "docplex" module with pip or conda. Running:

      docplex config --upgrade Full_Path_To_This_CPLEX_Studio_Installation
    

    will upgrade the CPLEX and CP Optimizer Python runtimes from the Community Edition version to a size-unlimited version.

    Then I keep follow it but shows

    E:\>docplex config --upgrade E:\Program Files\IBM\ILOG\CPLEX_Studio2212
    usage: docplex [-h] <command> ...
    docplex: error: unrecognized arguments: Files\IBM\ILOG\CPLEX_Studio2212

    I want to know what should I do next, is there something I missed? 



    ------------------------------
    Yuhui Yin
    ------------------------------


  • 2.  RE: Problem with upgrade the docplex

    Posted Wed March 05, 2025 03:55 AM

    Missing "" around the path.



    ------------------------------
    Olivier Lhomme
    ------------------------------



  • 3.  RE: Problem with upgrade the docplex

    Posted Fri April 11, 2025 11:08 AM

    I am also experiencing problems using the following command in Anaconda prompt after installing cplex and docplex in the environment:

    docplex config --upgrade Full_Path_To_This_CPLEX_Studio_Installation
    

    This returns an error:
    'docplex' is not recognized as an internal or external command, operable program or batch file.



    ------------------------------
    Nicole van der Zanden
    ------------------------------



  • 4.  RE: Problem with upgrade the docplex

    Posted 27 days ago

    Here are the steps to install the Python interface to CPLEX Optimization Studio. Maybe you missed step 2 ? 

    1. install regular CPLEX Optimization Studio say in <COSDIR>

    2. install CP Optimizer Python interface directly from PyPI or from Anaconda, using the commands
        pip install cplex (conda install cplex for Anaconda)
        pip install docplex (conda install docplex for Anaconda)
      The first command installs the Community Edition CPLEX and CP Optimizer runtimes as well as a low-level Python interface to CPLEX. The second installs the higher-level "docplex" Python package which includes CPLEX and CP Optimizer modelling and solving support. The Community Edition runtimes which come as standard are limited in the size of optimization problems that they can solve.
      You should try to run an example to check the installation of the Community Edition edition at this stage before proceeding to the upgrade.

    3. To upgrade the Community Edition runtimes and remove size limitations, use the command "docplex" which was installed when you installed the "docplex" module with pip or conda. Running:
        docplex config --upgrade <COSDIR>
      will upgrade the CPLEX and CP Optimizer Python runtimes from the Community Edition version to a size-unlimited version.