Python Setup (optional)

Running Hexaly Optimizer with pip

Once you have installed Hexaly Optimizer on your computer, the recommended way to link Hexaly Optimizer to your Python installation, is to type the following command in a command prompt or in the prompt of your Python environment (Anaconda for instance):

pip install hexaly

This command must be executed each time you install a new version of Hexaly Optimizer.

Note

Note that it only configures the integration of Hexaly Optimizer in Python. It is not a substitute for a proper installation of Hexaly Optimizer with a Hexaly license.

Running Hexaly Optimizer without pip

If you don’t have pip or if you don’t want to use pip, executing your program will require setting the PYTHONPATH environment variable beforehand, and the launching lines will depend on your system. If you are using a Python development environment, its settings page allows configuring the PYTHONPATH environment variable. Otherwise you can proceed as follows:

  • In a Windows command prompt you will type
    set PYTHONPATH=%HX_HOME%\bin\python
  • In a Windows PowerShell console you will type
    $env:PYTHONPATH=”$env:HX_HOME\bin\python”
  • On Linux of MacOS, the command is
    export PYTHONPATH=/opt/hexaly_15_0/bin/python