skillfed

Mosek

Python API for Mosek

mosek v11.2.2 430.5K downloads/30d#6,726 on PyPI
License unclear https://mosek.com/products/license-agreement Active released

What it is and what it does

MOSEK is a commercial optimization solver that handles a wide range of convex and mixed-integer problems through a Python interface. It supports linear programs (LP), quadratic programs (QP), second-order cone programs (SOCP), exponential and power cone problems, semidefinite programs (SDP), quadratically constrained quadratic programs (QCQP), and mixed-integer programs (MIP). The package wraps a compiled solver engine and requires numpy as its only runtime dependency.

Typically used in research, finance, engineering, and machine learning workflows where problem scale or numerical precision demands a commercial-grade solver. Requires Python 3.9 or later and a valid license (free trial and academic licenses available). Installation pulls precompiled binaries for common platforms, avoiding compilation overhead.

Use it for:

  • Portfolio optimization and risk management in quantitative finance
  • Large-scale machine learning problems requiring conic relaxations or semidefinite programming
  • Engineering design optimization with convex constraints
  • Operations research and resource allocation problems
  • Academic research in convex optimization and mathematical programming

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

MOSEK solves large-scale convex and mixed-integer optimization problems including linear, quadratic, conic, and semidefinite programs via a Python API.

Yes, if you have a convex or mixed-integer optimization problem at scale and can obtain a MOSEK license (free trial available). The solver is mature, actively maintained, and supports a broad problem class. No, if you need an open-source solver or cannot accept the licensing requirement. Verify license terms for your use case before committing.

Install

mosek on PyPI

pip

pip install mosek

uv

uv add mosek

poetry

poetry add mosek

Installing Mosek

Before you install

Medium install friction due to compiled binary wheels for multiple platforms (macOS ARM64, Linux x86_64 and aarch64, Windows x64). Active maintenance with a release 65 days ago. Single runtime dependency on numpy.

License in practice

License treatment is unclear; MOSEK requires a paid license, though trial and non-commercial academic licenses are available from the vendor. Verify licensing terms before production deployment.

Quickstart

pip install mosek
import mosek
import numpy as np
# Requires valid MOSEK license; see https://www.mosek.com for trial/academic options

MOSEK requires a valid license (free trial and academic licenses available at https://www.mosek.com). Python 3.9 or later required.

Verify before relying

  • Whether trial or academic licenses are sufficient for your intended use case
  • Performance characteristics and solver quality relative to open-source alternatives
  • Support and SLA terms included with different license tiers

Package facts

License https://mosek.com/products/license-agreement (unclear)
Python support supports the current Python release (<3.15,>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — numpy
Maintenance actively maintained — 65 days since the last release
First released
Downloads 430,486/month — #6,726 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mosek-11.2.2-cp39-abi3-macosx_11_0_arm64.whl; mosek-11.2.2-cp39-abi3-manylinux2014_x86_64.whl; mosek-11.2.2-cp39-abi3-manylinux_2_27_aarch64.whl; mosek-11.2.2-cp39-abi3-win_amd64.whl

Tags

convex optimization solverlinear programming Pythonsemidefinite programmingmixed-integer optimizationquadratic cone programminglarge-scale optimizationSOCP solver
optimizationconvex-programmingcommercial-solver

More Mathematics packages