Pablo Galindo Salgado <pablog...@gmail.com> added the comment: It seems that the problem is that `_Py_InitializeEx_Private` calls `_Py_InitializeCore` and `_Py_InitializeMainInterpreter`. The first one calls at the end `initimport` that in turns calls `importlib._install_external_importers` that sets the PathFinder. Then, `_Py_InitializeMainInterpreter` calls `initexternalimport` that in turns calls again `importlib._install_external_importers` and therefore we end with two PathFinders in sys.meta_path.
I think the solution is removing the call to initexternalimport in `_Py_InitializeMainInterpreter` as it has been alreade initialized by `_Py_InitializeCore`. ---------- nosy: +pablogsal _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33128> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com