this will help If you distribute your module as source, it can be compiled as necessary. This problem occurs a lot with Windows, for which modules are normally distributed as binaries. PEP 384 proposes a solution (a limited interface which is guaranteed to exist for all Python 3 versions) and is implemented in Python 3.2. Until then, you're stuck.
like below fixes the issue The Python bytecode itself is not platform-dependent, assuming a full Python VM implementation. There are specific modules and functions that are only available on certain platforms, therefore Python source code can be made platform-dependent if it uses these. The documentation specifies if a name is only available on a restricted subset of platforms, so avoiding these will go far to make it platform-independent.