Installation#
Recommended installation#
MESMO has not yet been deployed to Python pip
/ conda
package indexes, but can be installed in a local development environment as follows:
Check requirements:
Optimization solver²: Gurobi or CVXPY-supported solver.
Clone or download the repository. Ensure that the
cobmo
submodule directory is loaded as well.In
conda
-enabled shell (e.g. Anaconda Prompt), run:cd path_to_mesmo_repository
conda create -n mesmo -c conda-forge python=3.8 contextily cvxpy numpy pandas scipy
conda activate mesmo
pip install -v -e .
On Intel CPUs³:
conda install -c conda-forge "libblas=*=*mkl"
Notes#
¹ The installation via conda
is recommended, because it sets up a dedicated Python environment and supports the performant Intel MKL math library on Intel CPUs for numpy
/ scipy
. It also allows installing the contextily
package on Windows, which is required for some geographical plots. The direct installation via pip
in a non-conda
environment is also possible, but is currently not tested.
² Gurobi is currently the default optimization solver, because MESMO implements a direct Gurobi interface for better performance. Other solvers are supported via CVXPY and can be selected via MESMO configuration. CVXPY comes bundled with several open-source solvers and supports additional solvers via manual installation (see “Install with … support” sections in CVPXY installation guide). Note that interfacing solvers via CVXPY currently has performance limitations for large-scale scenarios.
³ On Intel CPUs, using the Intel MKL math library enables better performance in numpy
/ scipy
over the default OpenBLAS library. With conda-forge, these libraries can be configured via conda install
command.
Alternative installation#
If you are running into errors when installing or running MESMO, this may be due to incompatibility with new versions of package dependencies, which have yet to be discovered and fixed. As a workaround, try installing MESMO via the provided environment-windows-latest.yml
/ environment-macos-latest.yml
/ environment-ubuntu-latest.yml
, which represent the latest Python environment in which MESMO was tested and is expected to work for the respective OS.
Important
Please create an issue on Github if you run into problems with the recommended installation procedure.
Check requirements:
Optimization solver: Gurobi or CVXPY-supported solver.
Clone or download repository. Ensure that the
cobmo
submodule directory is loaded as well.In
conda
-enabled shell (e.g. Anaconda Prompt), run:cd path_to_mesmo_repository
On Windows:
conda env create -f environment-windows-latest.yml
On macOS:
conda env create -f environment-macos-latest.yml
On Ubuntu:
conda env create -f environment-ubuntu-latest.yml
conda activate mesmo
pip install -v -e .