(environment-variables)= # 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` - `SHOP_CPLEX_PATH` on Windows - `SHOP_GUROBI_PATH` on Windows - [deprecated] `ICC_COMMAND_PATH` ## `SHOP_BINARY_PATH` The `SHOP_BINARY_PATH` environment variable specifies the path to the core SHOP solver binaries. If not set, SHOP will look for the binaries in `ICC_COMMAND_PATH` (if it exists) and then in the current working directory. ## `SHOP_CPLEX_PATH` and `SHOP_GUROBI_PATH` on Windows Starting with `SHOP 17.15.0`, these environment variables on Windows specify the paths to the _external optimization solver_ binaries for CPLEX and GUROBI. If not set, SHOP will look for the external binaries in `SHOP_BINARY_PATH` and `ICC_COMMAND_PATH` (if they exist) and then in the current working directory. ## `SHOP_LICENSE_PATH` The `SHOP_LICENSE_PATH` environment variable specifies the path to the licence file. 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`, `SHOP_CPLEX_PATH`/`SHOP_GUROBI_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: ```python ShopSession( license_path="/license/path", solver_path ="/solver/path", cplex_path ="/cplex/path", # On Windows gurobi_path ="/gurobi/path" # On Windows ) ``` 2. Environment variables 3. Current directory