diff --git a/mesa/batchrunner.py b/mesa/batchrunner.py index 80ba23cafdf..e34193c3fd7 100644 --- a/mesa/batchrunner.py +++ b/mesa/batchrunner.py @@ -1,4 +1,5 @@ import itertools +import multiprocessing from collections.abc import Iterable, Mapping from functools import partial from multiprocessing import Pool @@ -8,6 +9,8 @@ from mesa.model import Model +multiprocessing.set_start_method("spawn", force=True) + def batch_run( model_cls: type[Model], diff --git a/pyproject.toml b/pyproject.toml index ee2dec72631..854d5a3af61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Development Status :: 3 - Alpha",