I am actually not a big fan of this PYTOM_GPU environment variable. As this complicated test execution shows, you can only run GPU code after setting this variable at the start--which is know taken care of in the pytom executable. It is pretty cumbersome.
Originally posted by @McHaillet in https://github.com/SBC-Utrecht/PyTomPrivate/issues/116#issuecomment-1434584115