Perhaps I should remove the plugin code from this pull request, and just add the Python 3 support. We can add the plugin code again after we fix `qt`.