在线程中使用Python设置环境variables

我有五个线程在我的代码…

五个线程由main.py启动

所以对于每个正在运行的线程,我需要将diff IP设置为环境值

thread-1: has to set 192.168.10.2 thread-2: has to set 192.168.10.3 thread-3: has to set 192.168.10.4 thread-4: has to set 192.168.10.5 thread-5: has to set 192.168.10.6 

请指导我解决这个问题

环境变量是在每个进程的基础上设置的,而不是每个线程的。