def custom_import_install(): if __builtin__.__import__ == NATIVE_IMPORTER: INVALID_MODULES.update(sys.modules.keys()) __builtin__.__import__ = custom_importer