← All install guides

01 / PYTHON SETUP

Install CoolBox
for Python.

Install the Python bindings straight from the repository, keep them in a virtual environment, then check that the dimensionality-reduction module imports.

5 MINPYTHONBEGINNER

Before you begin

Install Python and Git, then open a terminal in the folder where you keep your projects. A virtual environment keeps CoolBox and its dependencies separate from other Python work.

1. Create an environment

Create and activate a local environment. On Windows, use the PowerShell activation line; on macOS or Linux, use the shell activation line.

TERMINAL
python -m venv .venv
# Windows PowerShell
.\.venv\Scripts\Activate.ps1
# macOS / Linux
source .venv/bin/activate

2. Install CoolBox

Install CoolBox with pip and Git. The package includes native numeric matrix and graphics modules. Pip also installs NumPy, which the Python binding declares as a dependency; you do not need to install it separately. The built-in graph renderer does not require Matplotlib:

TERMINAL
python -m pip install git+https://github.com/MeanderingAI/CoolBox.git

3. Verify the install

The package includes native matrix/numeric and graphics modules alongside PCA. NumPy is installed as a declared Python dependency, while plotting uses CoolBox's renderer rather than Matplotlib:

PYTHON · COOLBOX MODULES
import ml_toolbox as ml
from ml_toolbox import matrix

data = matrix.DenseMatrix.from_rows([[1.0, 2.0], [3.0, 4.0]])
dr = ml.ml_core.dimensionality_reduction
graphics = ml.ml_core.graphics

pca = dr.PCA(n_components=2, center=True, scale=True)
print("CoolBox numeric, PCA, and graphics modules are ready")

If the import fails, confirm the virtual environment is active and that pip installed into that same environment. See the repository’s Python install notes .

Where to go next

Try the PCA tutorial to reduce a small dataset, or continue into the XOR network.