nice info - import ensurepip

Does that work if the thread is currently blocking, such as if waiting on network communication?

No it doesnā€™t, Python made it so you cannot kill a thread, so any running/blocking call in the thread will prevent the whole process from terminating, unless killed by the OS (via user or not).

The best approach in that case is to either make small jobs run inside the thread, so that even if you are stuck waiting, the task should finish relatively quickly. Or run a subprocess, at the expense of losing the main memory space (as well as losing all the BGE-specific modules, because you would be running a pure Python subprocess).

I went with small jobs :slight_smile: