# Traceback with ansible: AttributeError: 'module' object has no attribute '\_vendor'

**URL:** <https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328>\
**Category:** Ansible Project\
**Created:** [September 22, 2015, 2:50pm UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328 "2015-09-22T14:50:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tma0286](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@tma0286](https://forum.ansible.com/u/tma0286)\
**Post date:** [September 22, 2015, 2:50pm UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328/1 "2015-09-22T14:50:06Z")

</div>

Hi all. I hope you can help me investigating the problem why my ansible installation does not want to run.  
I get the following traceback in latest stable “release” as well as git checkout:

seadmin@aconf1a:/sw/ansible\_gitclone/ansible/bin\> ./ansible  
Traceback (most recent call last):  
File “./ansible”, line 40, in   
from ansible.utils.display import Display  
File “/sw/ansible/lib/ansible/utils/display.py”, line 35, in   
from ansible import constants as C  
File “/sw/ansible/lib/ansible/constants.py”, line 30, in   
from ansible.parsing.splitter import unquote  
File “/sw/ansible/lib/ansible/parsing/ **init**.py”, line 32, in   
from ansible.parsing.vault import VaultLib  
File “/sw/ansible/lib/ansible/parsing/vault/ **init**.py”, line 53, in   
from Crypto.Hash import SHA256, HMAC  
File “build/bdist.linux-x86\_64/egg/Crypto/Hash/HMAC.py”, line 66, in   
File “build/bdist.linux-x86\_64/egg/Crypto/Util/strxor.py”, line 7, in   
File “build/bdist.linux-x86\_64/egg/Crypto/Util/strxor.py”, line 3, in **bootstrap**  
File “build/bdist.linux-x86\_64/egg/pkg\_resources/ **init**.py”, line 90, in   
AttributeError: ‘module’ object has no attribute ‘\_vendor’

My older 2.0.0 ansible installation is running properly.

---

<div class="post-metadata">

**Author:** ![tma0286](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@tma0286](https://forum.ansible.com/u/tma0286)\
**Post date:** [September 23, 2015, 3:50pm UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328/2 "2015-09-23T15:50:01Z")

</div>

This is fixed as hacking/env-setup or python setup.py egg\_info was executed.

---

<div class="post-metadata">

**Author:** ![Anthony\_Green](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Anthony\_Green](https://forum.ansible.com/u/Anthony_Green)\
**Post date:** [November 6, 2015, 10:24am UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328/3 "2015-11-06T10:24:36Z")

</div>

AttributeError: ‘module’ object has no attribute ‘\_vendor’

I’m getting this error with v2.0.0-0.3.beta1 on OS X

---

<div class="post-metadata">

**Author:** ![Anthony\_Green](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Anthony\_Green](https://forum.ansible.com/u/Anthony_Green)\
**Post date:** [November 6, 2015, 10:43am UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328/4 "2015-11-06T10:43:47Z")

</div>

In my case the fix was to uninstall the cryptography pip I previously installed

---

<div class="post-metadata">

**Author:** ![Srdjan\_Grubor](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Srdjan\_Grubor](https://forum.ansible.com/u/Srdjan_Grubor)\
**Post date:** [January 15, 2016, 8:05pm UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328/5 "2016-01-15T20:05:11Z")

</div>

I fixed this issue on my Ubuntu 15.10 machine by installing python-paramiko, python-selinux, and python-crypto

Try installing all dependencies from regular ansible package (apt-cache show ansible) - you might have some missing.

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [January 15, 2016, 9:07pm UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328/6 "2016-01-15T21:07:44Z")

</div>

If you're encountering this with the PPAs, the 2.0.0.1  
python-setuptools was missing as a dependency in the debs that we  
built for the PPA. That can cause this error as well. The 2.0.0.2 PPA  
build should have fixed that problem.

-Toshio

---

<div class="post-metadata">

**Author:** ![Pablo\_Daniel\_Estigar](https://avatars.discourse-cdn.com/v4/letter/p/ecc23a/32.png) [@Pablo\_Daniel\_Estigar](https://forum.ansible.com/u/Pablo_Daniel_Estigar)\
**Post date:** [January 21, 2016, 12:21am UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328/7 "2016-01-21T00:21:58Z")

</div>

Hello,

I had similar error:

ansible  
Unexpected Exception: ‘module’ object has no attribute ‘\_init\_cffi\_1\_0\_external\_module’  
the full traceback was:

Traceback (most recent call last):  
File “/home/pablo/setup/ansible/bin/ansible”, line 74, in   
from ansible.cli.adhoc import AdHocCLI as mycli  
File “/home/pablo/setup/ansible/lib/ansible/cli/adhoc.py”, line 28, in   
from ansible.executor.task\_queue\_manager import TaskQueueManager  
File “/home/pablo/setup/ansible/lib/ansible/executor/task\_queue\_manager.py”, line 29, in   
from ansible.executor.play\_iterator import PlayIterator  
File “/home/pablo/setup/ansible/lib/ansible/executor/play\_iterator.py”, line 29, in   
from ansible.playbook.block import Block  
File “/home/pablo/setup/ansible/lib/ansible/playbook/ **init**.py”, line 25, in   
from ansible.playbook.play import Play  
File “/home/pablo/setup/ansible/lib/ansible/playbook/play.py”, line 27, in   
from ansible.playbook.base import Base  
File “/home/pablo/setup/ansible/lib/ansible/playbook/base.py”, line 35, in   
from ansible.parsing.dataloader import DataLoader  
File “/home/pablo/setup/ansible/lib/ansible/parsing/dataloader.py”, line 33, in   
from ansible.parsing.vault import VaultLib  
File “/home/pablo/setup/ansible/lib/ansible/parsing/vault/ **init**.py”, line 68, in   
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC  
File “/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/kdf/pbkdf2.py”, line 12, in   
from cryptography.hazmat.primitives import constant\_time  
File “/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/constant\_time.py”, line 9, in   
from cryptography.hazmat.bindings.\_constant\_time import lib  
AttributeError: ‘module’ object has no attribute ‘\_init\_cffi\_1\_0\_external\_module’

with all dependencies for ansible installed.

It was solved after removing: sudo dnf remove python-cryptography

it solved the issue immediatelly.

looks like there are some conflicts with python-crypt and python-cryptography.

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [January 21, 2016, 4:08pm UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328/8 "2016-01-21T16:08:50Z")

</div>

Unfortunately, with setuptools in the mix it's just as likely that the  
two python modules are compatible but when they're installed together  
a setuptools bug triggers and causes things like this. setuptools  
changes where python is searching for modules based on data installed  
globally (all of the egginfo files of packages) so I can kind of see  
how that can happen even though I can't see how this particular bug  
works ☹ On Ubuntu we found that even though the bug was experienced  
by people with both PyCrypto and Cryptography installed the bug was  
really that the setuptools egginfo wasn't installed.

-Toshio

---

<div class="post-metadata">

**Author:** ![Dan\_McCormick](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@Dan\_McCormick](https://forum.ansible.com/u/Dan_McCormick)\
**Post date:** [February 13, 2016, 10:33pm UTC](https://forum.ansible.com/t/traceback-with-ansible-attributeerror-module-object-has-no-attribute-vendor/19328/9 "2016-02-13T22:33:12Z")

</div>

In case this helps someone who finds this thread while Googling, I was able to solve this on Mac OS X by installing the cryptography package system-wide, i.e. “sudo pip install cryptography”.

Dan
