pygmo gives optimisation problems one interface across algorithms and islands
A Python platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
At a glance
- What is it?
- pygmo is a scientific Python library for massively parallel optimisation, built as a C++ core with Python bindings, where a problem, an algorithm, an island and a topology are all objects you can swap and combine, and the whole population can be spread across cores or a cluster. It suits researchers and engineers who need to run stochastic global and local optimisation at scale, and its pickle-based checkpoints mean a serialised archipelago is executable code.
- Who is it for?
- Researchers and engineers who need to run stochastic global or local optimisation across many cores or many machines, and who want one API for problems, algorithms and parallel topologies rather than a separate library per algorithm, are the people pygmo is for.
- Can I use it commercially?
- Yes, with conditions. MPL-2.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 18 days ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The unified interface is the point, not any single algorithm
The project describes itself as a scientific Python library for massively parallel optimization, built around the idea of providing a unified interface to optimization algorithms and to optimization problems and to make their deployment in massively parallel environments easy. That is the useful idea to hold on to, because pygmo does not contain a better optimiser than the alternatives, it contains a way to treat optimisers and problems as interchangeable parts. The problem you care about is an object, the algorithm is an object, the island is an object, and the topology that connects islands is an object too. So the research question becomes a matter of composition rather than of rewriting a solver, and a second question, which algorithm to use, becomes a configuration choice you can test. The topics attached to the repository show the intended territory, evolutionary algorithms and strategies, metaheuristics, multiobjective optimization, stochastic optimization and the island model.
The island model is what makes it parallel, and it is asynchronous
The parallelism comes from the asynchronous generalized island model, and the word asynchronous is doing real work in that phrase. The design is that a population is split across islands, each island runs its own copy of the algorithm against a copy of the problem, and the islands exchange migrants periodically according to a topology. Because the exchange is periodic and the islands do not synchronise with each other, an island that is slow does not hold up the rest, which is what makes the model a good fit for a heterogeneous cluster where nodes are shared with other work. The repository tree shows the C++ core in a pygmo directory alongside a CMakeLists.txt, a cmake directory and a tools directory, with the Python layer built on top, which is consistent with a design where the heavy numerical work stays in C++ and Python is the interface you program against.
The security note about pickle is the part to read before anything else
The readme carries a security note that deserves to be read twice, because it is a property of the design rather than a bug. pygmo relies on Python's pickle module, and by default on cloudpickle, to deserialise user-defined problems, algorithms, islands and the rest, across the population, archipelago, problem, algorithm, bfe, island, r_policy, s_policy and topology objects. The note then says that, as with the standard pickle module, deserialising data is equivalent to arbitrary code execution, and that you should never unpickle, load archipelago or island checkpoints, or otherwise deserialise pygmo objects coming from an untrusted or unauthenticated source. The practical consequence is concrete. The checkpointing and migration machinery that makes the library attractive for long optimisation runs is also the mechanism by which a malicious file would run code on your machine, so a workflow that ships checkpoints between machines has to treat them as executables rather than as data.
Installing means conda-forge, and PyPI wheels cover two Linux architectures
The recommended installation route is via conda-forge, which is the sensible default for a scientific library that pulls in a C++ toolchain.
conda install -c conda-forge pygmoThe PyPI route is also documented, and it is the one with a platform caveat.
pip install pygmoAt the moment, PyPI wheels are provided for Linux x86_64 and Linux aarch64 only, and for other platforms the instruction is to use conda-forge or build from source. So a macOS or Windows user is not getting a wheel, and a Linux user on a less common architecture is in the same position. The build from source is a C++ build driven by CMake, and the repository carries the CMakeLists.txt, the cmake directory and the clang-format configuration at the top level, alongside separate continuous integration workflows for Python and for manylinux, which is the standard name for the many-platform Linux wheel builds.
The package is citable, which matters more than it sounds
For a research library, the citation story is part of the adoption case, and pygmo handles it explicitly. There is a DOI for the software itself, pointing at a Zenodo deposit for the latest version, and a Journal of Open Source Software paper with its own DOI, and the readme asks that if you use pygmo as part of your research, teaching or other activities, you star the repository and cite the work. The BibTeX entry is provided in the readme, referring to the pygmo paper in the Journal of Open Source Software, and the full documentation lives on a separate site at esa.github.io/pygmo2. The combination of a peer-reviewed software paper, an archived DOI for the current version and a hosted documentation site is what distinguishes a library that intends to be used in published work from a script collection.
Where pygmo is the wrong choice
The first wrong case is a problem with a deterministic solution, because a global stochastic search will find a good answer without proving it is optimal, and a solver that proves optimality is a different tool with different guarantees. The second is a problem where the objective is cheap to evaluate and the answer is known to be near a particular point, since the island model spends its budget on broad exploration. The third is a project where parallel infrastructure is not available, since the library's premise is the opposite: a population spread over islands that exchange migrants, and running it on one core works but gives up the reason to use it. The fourth is a setting where untrusted input reaches the deserialisation path, and as the readme says plainly, that path is arbitrary code execution. The fifth is a team that needs a general purpose machine learning framework instead, since the repository topics are about optimisation and metaheuristics, and the library is not a place to look for a neural network trainer.
Editorial conclusion
Researchers and engineers who need to run stochastic global or local optimisation across many cores or many machines, and who want one API for problems, algorithms and parallel topologies rather than a separate library per algorithm, are the people pygmo is for. It is the wrong choice for a project that needs a deterministic solver, since the island model is inherently asynchronous and the results are stochastic, and it is the wrong choice if your checkpoints are going to arrive from an untrusted source, because the library's own security note says deserialising pygmo objects is equivalent to arbitrary code execution. Check three things before you adopt it: that the platform is one of the two with PyPI wheels, Linux x86_64 and Linux aarch64, because elsewhere you need conda-forge or a source build, that your problem type fits the library's problem and algorithm model rather than needing a bespoke solver, and that any checkpoint you load came from a source you trust, since the pickle warning in the readme is explicit. The licence is MPL-2.0, the last push was on 2026-10-05, and the newest release is v2.20.0 from the same day.
Frequently asked questions
What is pygmo and what does it do?
It is a scientific Python library for massively parallel optimization, providing a unified interface to optimization algorithms and optimization problems and making their deployment in massively parallel environments easy. It is built on the asynchronous generalized island model, with a C++ core and Python bindings.
How do I install pygmo?
The recommended route is conda install -c conda-forge pygmo, and pip install pygmo also works. PyPI wheels are provided for Linux x86_64 and Linux aarch64 only, so on other platforms you should use conda-forge or build from source.
Is it safe to load a pygmo checkpoint from another machine?
Not unless you fully trust the source. The readme states that pygmo relies on Python's pickle module, and by default on cloudpickle, to deserialise user-defined objects, and that deserialising data is equivalent to arbitrary code execution. You should never unpickle, load archipelago or island checkpoints, or otherwise deserialise pygmo objects coming from an untrusted or unauthenticated source.
What is the island model in pygmo?
It is the parallelisation strategy: a population is spread across islands that each run the algorithm on the problem and exchange migrants periodically through a topology. The model is asynchronous, so a slow island does not block the others, which suits shared or heterogeneous clusters.
Where is the pygmo documentation and how do I cite it?
The full documentation is at esa.github.io/pygmo2, and the readme asks that you cite the pygmo paper in the Journal of Open Source Software, providing the BibTeX entry, while a separate Zenodo DOI points at the latest version of the software.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/esa-pygmo2)Was this useful?