You don't.
Your best bet is to create you GUI in HTML and serve it up as a web page from your Python program. Then you can use all the GUI rendering power of HTML, CSS, SVG, WebGL, Javascript, etc that a browser rendering engine offers. With the added bonus that you can now view that GUI and control you application remotely from any browser.
Don't want to use a browser? That's OK, when you have that web page working wrap it up in Electron as a self-standing application.
https://electronjs.org
Memory in C++ is a leaky abstraction .