Decision Optimization

Decision Optimization

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

 View Only
  • 1.  cplex python setup.py install warnings

    Posted Wed September 25, 2024 01:05 PM

    I created a new python environment using python 3.10.  Using the full blown CPLEX 22.1.1.0, which we have as a business partner (i.e., not the community edition).  To install the python libraries, I do `python setup.py install`.  Then I get this wonderful message:

    ********************************************************************************
           Please avoid running ``setup.py`` directly.
           Instead, use pypa/build, pypa/installer or other
           standards-based tools.
           See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
           ********************************************************************************

    The installation seems to work, but is there a better way to do the installation to avoid this message?



    ------------------------------
    Irv Lustig
    Certified Analytics Professional
    INFORMS Fellow
    Optimization Principal
    Princeton Consultants
    ------------------------------


  • 2.  RE: cplex python setup.py install warnings

    Posted Thu September 26, 2024 08:12 AM

    Hi Irv,

    `pip install . ` does the job  without complaint.

    Since setuptools CLI is no longer maintained, the use of 'pip' is recommended by the Python community



    ------------------------------
    Cédric Doens
    ------------------------------



  • 3.  RE: cplex python setup.py install warnings

    Posted Thu September 26, 2024 02:13 PM

    Cedric:

    > `pip install . ` does the job  without complaint.

    That's almost true. 

    The issue is that there are 2 `setup.py` files:

    • /IBM/ILOG/CPLEX_Studio2211/python/setup.py
    • /IBM/ILOG/CPLEX_Studio2211/cplex/python/3.10/x64_win64/

    The `pip install .` works for the second one, but not the first.

    The docs should be cleared up on this matter.



    ------------------------------
    Irv Lustig
    Certified Analytics Professional
    INFORMS Fellow
    Optimization Principal
    Princeton Consultants
    ------------------------------