Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ansible-galaxy throws ImportError: No module named yaml

Tags:


When I try to install ansible role, I see this exception.

 $ ansible-galaxy install zzet.postgresql  Traceback (most recent call last):  File "/Users/myHomeDir/.homebrew/Cellar/ansible/1.4.3/libexec/bin/ansible-galaxy", line 34, in <module>  import yaml  ImportError: No module named yaml 

OS: Mac Os Maverick
Ansible: 1.4.3

Does anyone know how to fix it?

like image 306
Alexander Vagin Avatar asked Jan 07 '14 08:01

Alexander Vagin


1 Answers

Based on the error message, it tries to import the python module yaml but cannot find it. The yaml module is called pyyaml when you install it with pip:

pip install pyyaml

If pip is not installed on your mac then you can install it as,

easy_install pip

like image 181
Vilsepi Avatar answered Oct 02 '22 12:10

Vilsepi