{"id":22996,"library":"xpresslibs","title":"FICO Xpress Optimizer Libraries","description":"Python distribution of the FICO Xpress Optimizer solver libraries (version 9.8.1). Provides the core C libraries (XPRS DLLs/SOs) for mathematical optimization, typically accessed via the xpress Python package. Bundles the native solver binaries needed by the xpress interface.","status":"active","version":"9.8.1","language":"python","source_language":"en","source_url":"https://github.com/fico-xpress/xpress-python","tags":["optimization","solver","linear programming","mixed-integer programming"],"install":[{"cmd":"pip install xpresslibs","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"xpresslibs provides the native libraries required by the xpress package's Optimizer API. Without xpress, the libraries are not directly usable from Python.","package":"xpress>=9.8.1","optional":false}],"imports":[{"note":"xpresslibs is only a dependency package containing native binaries; user code imports the xpress package, not xpresslibs directly.","wrong":"import xpresslibs","symbol":"XPRS","correct":"import xpress as xp"},{"note":"To locate the installed libraries, use xpresslibs.get_lib_path(). The xpress package automatically discovers these paths.","wrong":null,"symbol":"Library path (e.g., xpresslibs.get_lib_path())","correct":"import xpresslibs; print(xpresslibs.get_lib_path())"}],"quickstart":{"code":"import xpress as xp\n\np = xp.problem()\nx = p.addVariable(name='x')\ny = p.addVariable(name='y')\np.setObjective(x + 2*y, sense=xp.minimize)\np.addConstraint(x + y >= 1)\np.optimize()\nprint(\"x =\", p.getSolution(x))\nprint(\"y =\", p.getSolution(y))","lang":"python","description":"Basic usage: create a problem, add variables and constraints, solve with Xpress Optimizer."},"warnings":[{"fix":"Ensure xpresslibs version matches xpress package version (e.g., both 9.8.1).","message":"xpresslibs 9.8.1 includes the Xpress Optimization 9.8.1 solver libraries. Libraries are platform-specific (Windows, Linux, macOS) and require matching architecture (64-bit). Incompatible with older xpress Python package versions.","severity":"breaking","affected_versions":">=9.8.0"},{"fix":"Install both: pip install xpress xpresslibs, or simply pip install xpress which automatically pulls xpresslibs.","message":"xpresslibs does not install the xpress Python package; it only provides the native libraries. Installing xpresslibs alone will not make the solver usable.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a 64-bit Python interpreter and operating system.","message":"Support for 32-bit architectures was dropped in Xpress 9.0. Older xpresslibs versions may still include 32-bit libraries, but 9.8.1 only ships 64-bit binaries.","severity":"deprecated","affected_versions":">=9.0"},{"fix":"Set environment variable XPRESSDIR to the installation path or place license in the working directory. Obtain a license from FICO.","message":"License activation required. The Xpress Optimizer is commercial software; a license file (xpauth.xpr) must be present. Without a valid license, the solver fails with an error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install the xpress package: pip install xpress","cause":"xpress Python package not installed; only xpresslibs is installed.","error":"ModuleNotFoundError: No module named 'xpress'"},{"fix":"Ensure xpauth.xpr license file is in the current directory or set XPRESSDIR environment variable to the directory containing the license.","cause":"Xpress license file not found or invalid.","error":"xpress.initlicense(): License error: No license found"},{"fix":"Ensure xpresslibs is correctly installed. Try reinstalling: pip install --upgrade xpress xpresslibs. For manual path setting, use xpresslibs.add_to_ld_library_path() or set LD_LIBRARY_PATH.","cause":"Native libraries not found. On Linux, the library path may not be set.","error":"ImportError: libxprs.so: cannot open shared object file: No such file or directory"},{"fix":"Use a 64-bit Python installation.","cause":"Attempting to load 64-bit library with a 32-bit Python interpreter.","error":"OSError: [WinError 193] %1 is not a valid Win32 application"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}