  Renormalization group equations are an essential tool for the description of
theories accross different energy scales. Even though their expressions at
two-loop for an arbitrary gauge field theory have been known for more than
thirty years, deriving the full set of equations for a given model by hand is
very challenging and prone to errors. To tackle this issue, we have introduced
in [1] a Python tool called PyR@TE; Python Renormalization group equations @
Two-loop for Everyone. With PyR@TE, it is easy to implement a given Lagrangian
and derive the complete set of two-loop RGEs for all the parameters of the
theory. In this paper, we present the new version of this code, PyR@TE 2, which
brings many new features and in particular it incorporates kinetic mixing when
several $\mathrm{U}(1)$ gauge groups are involved. In addition, the group
theory part has been greatly improved as we introduced a new Python module
dubbed PyLie that deals with all the group theoretical aspects required for the
calculation of the RGEs as well as providing very useful model building
capabilities. This allows the use of any irreducible representation of the
$\mathrm{SU}(n)$, $\mathrm{SO}(2n)$ and $\mathrm{SO(2n+1)}$ groups. %
Furthermore, it is now possible to implement terms in the Lagrangian involving
fields which can be contracted into gauge singlets in more than one way. As a
byproduct, results for a popular model (SM+complex triplet) for which, to our
knowledge, the complete set of two-loop RGEs has not been calculated before are
presented in this paper. Finally, the two-loop RGEs for the anomalous dimension
of the scalar and fermion fields have been implemented as well. It is now
possible to export the coupled system of beta functions into a numerical C++
function, leading to a consequent speed up in solving them.
