It sounds like this is the warning you're trying to suppress. If it is, then the reason you can't suppress it is because it's being thrown by the PyInstaller bootloader before your script is even run (it's a reported bug). As described in the link, the duplicate causing the warning can be removed by adding the following code to your spec file after a = Analysis...
:
for d in a.datas:
if 'pyconfig' in d[0]:
a.datas.remove(d)
break