Python project integration with Ansible API. After upgrading Ansible from 2.14 to 2.15, playbook execution failed

We used Ansible’s Python API to execute Playbook, but recently Ansible is preparing to upgrade from 2.14 to 2.15. When executing Playbook, there will be an error message: No module named \ "Ansible_collections. Ansible. builtin ".
I found during debugging that the difference between 2.14 and 2.15 is that Ansible was not loaded_ Builtin_ Runtime.yml file. I would like to ask everyone how to solve this problem

Here is the code:
playbook = PlaybookExecutor(playbooks=playbook_path,

    result =

Are you using ansible-runner? That’s the only public API for running playbooks I’m aware of. If you are using internals of ansible-core you should switch to using ansible-runner.