Here are the steps to install the Python interface to CPLEX Optimization Studio. Maybe you missed step 2 ?
Original Message:
Sent: Fri April 11, 2025 03:14 AM
From: Nicole van der Zanden
Subject: Problem with upgrade the docplex
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
Original Message:
Sent: Mon March 03, 2025 12:31 AM
From: Yuhui Yin
Subject: Problem with upgrade the docplex
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
------------------------------