You can use JMetalPy, a Python implementation for the JMetal Meta-heuristic search library.
You need to define and implement how to encode your solutions and implement a fitness function.
5
solved How can I use Genetic Algorithms to solve non-linear optimization problems in Python? [closed]