https://github.com/trolldbois/ctypeslib/blob/master/ctypeslib/__init__.py#L109 assumes that the clang import package will always have a run-time queryable version.
This is not always the case, e.g. the Debian python3-clang package.
My understanding is that distribution packages are not required to supply provide a queryable version during run-time1, so I think it would be worth trying to handle those cases.
I've also asked the Debian package maintainers to provide the version in their distribution package: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1121935