1. How to install¶
The following sections exemplify how pycombina can be installed on Ubuntu 22.04 / Debian 12 or Windows 10. Depending on your local setup, however, these instructions might need to be adapted.
1.1. Install on Ubuntu 22.04 / Debian 12¶
First, install the following packages via apt (to install packages via apt, you might need root priviliges):
apt install python3-venv python3-dev g++ git
Please note: Python version >= 3.8 is required to use pycombina.
Then, set up and activate a Python virtual environment for installing pycombina:
python3 -m venv --upgrade-deps pycombina-env
source pycombina-env/bin/activate
(Alternatively, you can chose a different name for the environment if you like, or install pycombina in an existing virtual environment.)
Afterwards, clone the pycombina repository by running:
git clone https://github.com/adbuerger/pycombina.git
Finally, navigate into the cloned directory and install pycombina by running:
cd pycombina
pip install .
This will attempt to install package dependencies and build the BnB solver extension.
Please note: pycombina uses features available only from C++11 on and uses pybind11 [1] .
For using the MILP-based combinatorial integral approximation solver pycombina.CombinaMILP, Gurobi and it’s Python interface [2] must be available.
For running the webservice-example in examples/webservice_example.py, Flask [5] is required.
1.2. Install on Windows 10¶
Note
As an alternative to the instructions provided below, you could consider to setup Windows Subsystem for Linux (WSL) on your Windows machine, and then refer to the Linux installation instructions provided above to install pycombina. Instructions on how to set up WSL, however, are out of scope of this documentation.
For obtaining Python 3 on Windows, Anaconda [3] can be used. For building the C++ extensions of pycombina, a 64 bit Visual C++ compiler is required, which can be obtained, e. g., within Visual Studio Community [4], which is free for private and/or academic use.
Consider to set up a separate Conda environment for pycombina. Then, open an Anaconda Prompt and activate the environment that you want to install pycombina in.
If you have git installed, you can clone the pycombina repository by running:
git clone https://github.com/adbuerger/pycombina.git
or alternatively your can download the latest version from https://github.com/adbuerger/pycombina using your web browser and extract the files afterwards.
Finally, navigate into the cloned directory and install pycombina by running:
cd pycombina
pip install .
This will attempt to install package dependencies and build the BnB solver extension.
Please note: pycombina uses features available only from C++11 on and uses pybind11 [1] .
For using the MILP-based combinatorial integral approximation solver pycombina.CombinaMILP, Gurobi and it’s Python interface [2] must be available.