Pyinstaller doesn't import ansible library (Python API v2 of Ansible)

Hello all,
I’m trying to execute a binary file generated by Pyinstaller , but I have got this error:

Traceback (most recent call last):
File “kubernetes_deployer/cm2_deploy_ansible.py”, line 32, in
File “/tmp/pip-install-mdsANt/pyinstaller/PyInstaller/loader/pyimod03_importers.py”, line 395, in load_module
File “ansible/parsing/dataloader.py”, line 15, in
File “/tmp/pip-install-mdsANt/pyinstaller/PyInstaller/loader/pyimod03_importers.py”, line 395, in load_module
File “ansible/constants.py”, line 184, in
File “ansible/config/manager.py”, line 230, in init
File “ansible/config/manager.py”, line 259, in _read_config_yaml_file
ansible.errors.AnsibleError: Missing base YAML definition file (bad install?): /tmp/_MEImMarly/ansible/config/base.yml
[16272] Failed to execute script cm2_deploy_ansible

Pyinstaller comand is defined in Jenkins configuration, and I use:

Ansible v2.7.5 , Pyinstaller v3.4 and Python v2.7.12 (I tried python v3.5 but same error)

I appreciate any help to solve this issue, for more details please ask me

Thanks to you all :slight_smile: