Environment variables#

SHOP requires binaries and a license to work properly. The files can be located in the current working directory or in an other directory. If the binaries and/or the license file is located in a different directory, you need to inform SHOP where to locate the files.

SHOP contains the following environment variables:

  • SHOP_BINARY_PATH

  • SHOP_LICENSE_PATH

  • [deprecated] ICC_COMMAND_PATH

SHOP_BINARY_PATH#

SHOP_BINARY_PATH is used to specify where the binaries are located. If not set, SHOP will look for the binaries in ICC_COMMAND_PATH (if it exists) and then in the current working directory.

SHOP_LICENSE_PATH#

SHOP will look for the license file in the path specified by the SHOP_LICENSE_PATH variable. If not set, SHOP will look for the license in ICC_COMMAND_PATH (if it exists) and then in the current working directory.

[deprecated]: ICC_COMMAND_PATH#

This is the old path used to show SHOP where to look for the license and binaries, and is deprecated. Use SHOP_BINARY_PATH and SHOP_LICENSE_PATH instead.

SHOP binaries location priority#

It is possible to set the required variables both in pyshop and using environment variables. Environment priority is as follows:

  1. If you use pyshop, the inline variables in the ShopSession constructor have the highest priority and will ignore environment variables. E.g:

ShopSession(license_path="/license/path", solver_path="/solver/path")
  1. Environment variables

  2. Current directory