Installation¶
Quick Install¶
That's it! Pre-built wheels are available for:
| Platform | Architectures |
|---|---|
| macOS | Intel (x86_64), Apple Silicon (arm64) |
| Linux | x86_64, aarch64 |
| Windows | x86_64 |
Requirements: Python 3.9+ and NumPy (installed automatically).
Verify Installation¶
from pogs import solve_lasso
import numpy as np
A = np.random.randn(100, 50)
b = np.random.randn(100)
result = solve_lasso(A, b, lambd=0.1)
print(f"Solved in {result['iterations']} iterations")
Optional: CVXPY Integration¶
To use POGS with CVXPY, install CVXPY separately:
Then use pogs_solve():
import cvxpy as cp
from pogs import pogs_solve
x = cp.Variable(50)
prob = cp.Problem(cp.Minimize(cp.sum_squares(A @ x - b) + 0.1 * cp.norm(x, 1)))
pogs_solve(prob) # Auto-detects Lasso, uses fast solver
print(x.value)
Building from Source¶
For development or if pre-built wheels aren't available:
Prerequisites¶
Install from GitHub¶
Local Development¶
C++ Library¶
If you need the C++ library directly:
git clone https://github.com/foges/pogs.git
cd pogs
cmake -B build -DCMAKE_BUILD_TYPE=Release -DPOGS_BUILD_GPU=OFF
cmake --build build
The library will be in build/lib/.
Troubleshooting¶
"No matching distribution found"¶
Your platform may not have pre-built wheels. Build from source:
ImportError on Linux¶
You may need BLAS/LAPACK runtime libraries:
Slow performance¶
Ensure NumPy uses optimized BLAS:
For best performance, NumPy should use OpenBLAS, MKL, or Accelerate (macOS).
Next Steps¶
- Quick Start - Run your first optimization
- API Reference - Full function documentation