This is the thing. Try using the last version of slicer with python 3.9 and please try to compile your library also in python 3.9
This is the thing. Try using the last version of slicer with python 3.9 and please try to compile your library also in python 3.9