Install & Compatibility
Where this runs
tested against v0.15.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 18.8s · import 5.602s · 511MB
523MB installed
● package 523MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
openml
✓ import openml
✗ from openml import *
Wildcard imports discouraged; use explicit submodules like openml.datasets.
openml.datasets
✓ from openml.datasets import get_dataset
✗ from openml.datasets import list_datasets
list_datasets is deprecated, use openml.datasets.list_datasets() or openml.datasets.get_dataset_list().
openml.tasks
✓ from openml.tasks import get_task
✗ import openml.tasks as tasks
That works, but ensure using correct function names.
Setup OpenML, list datasets, download and inspect the Iris dataset.
import openml
openml.config.apikey = openml.config.get_api_key() # uses ~/.openml/config or environment
# List datasets
datasets = openml.datasets.list_datasets()
print(f"Number of datasets: {len(datasets)}")
# Download a dataset (iris)
dataset = openml.datasets.get_dataset(61)
X, y, categorical_names, attribute_names = dataset.get_data(target=dataset.default_target_attribute)
print(X.head())
Errors
Common errors & fixes
openml.exceptions.OpenMLServerError: The request has not been authorized (401)
Missing or invalid OpenML API key.
fixSet API key via environment variable OPENML_API_KEY or openml.config.apikey = '...'
AttributeError: 'int' object has no attribute 'get' (when calling get_dataset with wrong ID)
Dataset ID does not exist or is not an integer. Function expects integer ID but may receive something else.
fixEnsure dataset ID is valid integer. Use list_datasets() to check existing IDs.
ModuleNotFoundError: No module named 'openml'
OpenML not installed or installed in different environment.
fixRun `pip install openml` and ensure correct Python environment is active.
Upgrade
Version history
0.15.1latest on PyPI · released Jan 25, 2025
Audit
Dependencies
pandasrequiredData handling for datasets and runs
requestsrequiredHTTP communication with OpenML server
scikit-learnrequiredMachine learning utilities (e.g., check_consistent_length)
xmltodictrequiredParsing XML responses from OpenML
liac-arffrequiredARFF file format support