One big step for Python 3 support. With this patch and manual installation of pyldap and nss, pki can be imported under Python 3.4. The code doesn't run properly yet, though. Run python-modernize fixers: libmodernize.fixes.fix_import libmodernize.fixes.fix_print libmodernize.fixes.fix_input_six libmodernize.fixes.fix_xrange_six lib2to3.fixes.fix_execfile libmodernize.fixes.fix_metaclass libmodernize.fixes.fix_unicode_type libmodernize.fixes.fix_dict_six Add more from __future__ import absolute_import Manually fix import problems with either six.moves or manual try/except ImportError blocks. Remove Exception.message attribute access. Add a workaround for policycoreutils-python3. It lacks sepolgen on Fedora 22. Test pep8 and lint on Python 3 with tox.