Environment:Mlflow Mlflow Python Runtime Environment
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, ML_Platform |
| Last Updated | 2026-02-13 20:00 GMT |
Overview
Python 3.10+ runtime environment with core dependencies for the full MLflow platform including experiment tracking, model management, and serving.
Description
This environment defines the base Python runtime and core package dependencies required to run the full MLflow platform. MLflow requires Python 3.10 or higher and depends on a substantial set of libraries for web serving (Flask, FastAPI, uvicorn), data handling (pandas, numpy, pyarrow), machine learning (scikit-learn, scipy), database storage (SQLAlchemy, alembic), and observability (OpenTelemetry). The platform ships in three variants: mlflow (full), mlflow-skinny (minimal client), and mlflow-tracing (tracing SDK only).
Usage
This environment is required for all MLflow operations including experiment tracking, model logging, model serving, and the MLflow UI server. Every Implementation page in this wiki requires this base environment to function. The skinny variant (mlflow-skinny) can be used when only tracking client operations are needed without serving or data science dependencies.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux, macOS, or Windows | gunicorn on Unix-like only; waitress on Windows |
| Python | >= 3.10 | Specified in pyproject.toml `requires-python` |
| Disk | ~500MB | For full installation with all dependencies |
Dependencies
Core Python Packages (Full MLflow)
- `Flask` < 4
- `Flask-CORS` < 7
- `alembic` < 2, != 1.10.0
- `cachetools` >= 5.0.0, < 8
- `click` >= 7.0, < 9
- `cloudpickle` < 4
- `cryptography` >= 43.0.0, < 47
- `databricks-sdk` >= 0.20.0, < 1
- `docker` >= 4.0.0, < 8
- `fastapi` < 1
- `gitpython` >= 3.1.9, < 4
- `graphene` < 4
- `gunicorn` < 26 (Unix-like only)
- `importlib_metadata` >= 3.7.0, < 9, != 4.7.0
- `matplotlib` < 4
- `numpy` < 3
- `opentelemetry-api` >= 1.9.0, < 3
- `opentelemetry-sdk` >= 1.9.0, < 3
- `opentelemetry-proto` >= 1.9.0, < 3
- `packaging` < 27
- `pandas` < 3
- `protobuf` >= 3.12.0, < 7
- `pyarrow` >= 4.0.0, < 24
- `pydantic` >= 2.0.0, < 3
- `python-dotenv` >= 0.19.0, < 2
- `pyyaml` >= 5.1, < 7
- `requests` >= 2.17.3, < 3
- `scikit-learn` < 2
- `scipy` < 2
- `sqlalchemy` >= 1.4.0, < 3
- `sqlparse` >= 0.4.0, < 1
- `typing-extensions` >= 4.0.0, < 5
- `uvicorn` < 1
- `waitress` < 4 (Windows only)
Skinny Client Packages (mlflow-skinny)
- `click` >= 7.0, < 9
- `cloudpickle` < 4
- `python-dotenv` >= 0.19.0, < 2
- `gitpython` >= 3.1.9, < 4
- `pyyaml` >= 5.1, < 7
- `protobuf` >= 3.12.0, < 7
- `requests` >= 2.17.3, < 3
- `packaging` < 27
- `importlib_metadata` >= 3.7.0, < 9
- `sqlparse` >= 0.4.0, < 1
- `cachetools` >= 5.0.0, < 8
- `opentelemetry-api` >= 1.9.0, < 3
- `opentelemetry-sdk` >= 1.9.0, < 3
- `databricks-sdk` >= 0.20.0, < 1
- `pydantic` >= 2.0.0, < 3
- `typing-extensions` >= 4.0.0, < 5
- `fastapi` < 1
- `uvicorn` < 1
Known Incompatibilities
- `xgboost` >= 3.1.0 breaks shap compatibility (blocksize format change)
- `pyspark` >= 4.1.0 causes documentation build issues
- `transformers` >= 5 not yet supported
- `setuptools` >= 82 removed `pkg_resources` breaking sphinx
Credentials
The following environment variables may be required depending on the tracking backend:
- `MLFLOW_TRACKING_URI`: Tracking server URI (file store, database, or remote server)
- `MLFLOW_TRACKING_USERNAME`: Username for basic auth to tracking server
- `MLFLOW_TRACKING_PASSWORD`: Password for basic auth to tracking server
- `MLFLOW_TRACKING_TOKEN`: Bearer token for tracking server authentication
- `DATABRICKS_HOST`: Databricks workspace URL (when using Databricks backend)
- `DATABRICKS_TOKEN`: Databricks personal access token
Quick Install
# Install full MLflow
pip install mlflow
# Install skinny client (minimal dependencies)
pip install mlflow-skinny
# Install tracing SDK only
pip install mlflow-tracing
# Install with optional extras
pip install mlflow[gateway] # AI Gateway support
pip install mlflow[genai] # GenAI evaluation features
pip install mlflow[db] # Database drivers (MySQL, PostgreSQL, MSSQL)
Code Evidence
Python version requirement from `pyproject.toml:10`:
requires-python = ">=3.10"
Package variant detection from `mlflow/version.py:7-29`:
VERSION = "3.10.1.dev0"
IS_TRACING_SDK_ONLY: bool # True if only mlflow-tracing installed
IS_MLFLOW_SKINNY: bool # True if only mlflow-skinny installed
IS_FULL_MLFLOW: bool # True if full mlflow package installed
Environment variable type system from `mlflow/environment_variables.py:13-50`:
class _EnvironmentVariable:
def __init__(self, name, type_, default):
if type_ == bool and not isinstance(self, _BooleanEnvironmentVariable):
raise ValueError("Use _BooleanEnvironmentVariable instead for boolean variables")
self.name = name
self.type = type_
self.default = default
def get(self):
if (val := self.get_raw()) is not None:
try:
return self.type(val)
except Exception as e:
raise ValueError(f"Failed to convert {val!r} for {self.name}: {e}")
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `requires-python>=3.10` | Python version too old | Upgrade to Python 3.10+ |
| `Versions of mlflow and child packages are different` | Version mismatch between mlflow packages | `pip install mlflow==X.Y.Z mlflow-skinny==X.Y.Z` |
| `Failed to convert value for MLFLOW_*` | Invalid environment variable value | Check the expected type (bool, int, str, float) |
| `ModuleNotFoundError: No module named 'flask'` | Using skinny client for server operations | `pip install mlflow` (full package) |
Compatibility Notes
- Windows: Uses `waitress` instead of `gunicorn` for WSGI serving. Gunicorn is excluded via `platform_system != 'Windows'` marker.
- macOS: Full support. Docker features require Docker Desktop.
- Linux: Full support. Recommended for production deployments.
- mlflow-skinny: Does not include Flask, pandas, numpy, scipy, scikit-learn, matplotlib. Cannot run the tracking server or model serving.
- mlflow-tracing: Only includes tracing and OpenTelemetry dependencies. Cannot perform experiment tracking or model management.
Related Pages
- Implementation:Mlflow_Mlflow_Set_Tracking_Uri_and_Set_Experiment
- Implementation:Mlflow_Mlflow_Start_Run
- Implementation:Mlflow_Mlflow_Log_Param
- Implementation:Mlflow_Mlflow_Log_Metric
- Implementation:Mlflow_Mlflow_Log_Artifact
- Implementation:Mlflow_Mlflow_Pyfunc_Log_Model
- Implementation:Mlflow_Mlflow_Pyfunc_Load_Model
- Implementation:Mlflow_Mlflow_Register_Model
- Implementation:Mlflow_Mlflow_Search_Traces
- Implementation:Mlflow_Mlflow_Genai_Evaluate