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

**URL:** <https://forum.ansible.com/t/pyinstaller-doesnt-import-ansible-library-python-api-v2-of-ansible/29369>\
**Category:** Ansible Developer\
**Created:** [January 4, 2019, 2:17pm UTC](https://forum.ansible.com/t/pyinstaller-doesnt-import-ansible-library-python-api-v2-of-ansible/29369 "2019-01-04T14:17:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kawther\_Arfaoui](https://avatars.discourse-cdn.com/v4/letter/k/b5a626/32.png) [@Kawther\_Arfaoui](https://forum.ansible.com/u/Kawther_Arfaoui)\
**Post date:** [January 4, 2019, 2:17pm UTC](https://forum.ansible.com/t/pyinstaller-doesnt-import-ansible-library-python-api-v2-of-ansible/29369/1 "2019-01-04T14:17:31Z")

</div>

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 🙂
