Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

How to Install multiple versions of the CPLEX-Python modules in parallel

  • 1.  How to Install multiple versions of the CPLEX-Python modules in parallel

    Posted 03/18/12 07:31 PM

    Originally posted by: HamishWaterer


    Hi,

    Can you please tell me how to install multiple versions (CPLEX v12.3 and v12.4 for example) of the CPLEX-Python modules in parallel? Can I simply edit the package, package_dir, and package_data parameters in the setup.py script? If so what should these be changed to? How should these different versions then be imported in a Python script once installed?

    Thanks,
    Hamish
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to Install multiple versions of the CPLEX-Python modules in parallel

    Posted 04/16/12 04:44 PM

    Originally posted by: SystemAdmin


    Provided you installed 12.3 and 12.4 into different locations it should be sufficient to set the PYTHONPATH environment appropriately.
    For example, I have installed 12.3 and 12.4 into $HOME/COS-12.3 and $HOME/COS-12.4. On my Linux box I can simply do (using bash)
    PYTHONPATH=$PYTHONPATH:$HOME/COS-12.3/cplex/python/x86-64_sles10_4.1/ ./script.py
    PYTHONPATH=$PYTHONPATH:$HOME/COS-12.4/cplex/python/x86-64_sles10_4.1/ ./script.py
    

    to run script.py with either 12.3 or 12.4. Here script.py is just one of the example files distributed with CPLEX.
    #CPLEXOptimizers
    #DecisionOptimization