Error while installing ansible-galaxy on Mac

0 votes

I'm trying to install ansible-galaxy roles on Mac OS X El Capitan via CLI

$ ansible-galaxy install -r requirements.yml

I am getting this error:

ERROR! Unexpected Exception: (setuptools 1.1.6 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python), Requirement.parse('setuptools>=11.3'))
the full traceback was:

Traceback (most recent call last):
  File "/usr/local/bin/ansible-galaxy", line 73, in <module>
    mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
  File "/Library/Python/2.7/site-packages/ansible/cli/", line 38, in <module>
    from ansible.galaxy.role import GalaxyRole
  File "/Library/Python/2.7/site-packages/ansible/galaxy/", line 35, in <module>
    from ansible.playbook.role.requirement import RoleRequirement
  File "/Library/Python/2.7/site-packages/ansible/playbook/", line 25, in <module>
    from import Play
  File "/Library/Python/2.7/site-packages/ansible/playbook/", line 27, in <module>
    from ansible.playbook.base import Base
  File "/Library/Python/2.7/site-packages/ansible/playbook/", line 35, in <module>
    from ansible.parsing.dataloader import DataLoader
  File "/Library/Python/2.7/site-packages/ansible/parsing/", line 32, in <module>
    from ansible.parsing.vault import VaultLib
  File "/Library/Python/2.7/site-packages/ansible/parsing/vault/", line 67, in <module>
    from cryptography.hazmat.primitives.hashes import SHA256 as c_SHA256
  File "/Library/Python/2.7/site-packages/cryptography/hazmat/primitives/", line 15, in <module>
    from cryptography.hazmat.backends.interfaces import HashBackend
  File "/Library/Python/2.7/site-packages/cryptography/hazmat/backends/", line 7, in <module>
    import pkg_resources
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/", line 2797, in <module>
    parse_requirements(__requires__), Environment()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/", line 580, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
VersionConflict: (setuptools 1.1.6 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python), Requirement.parse('setuptools>=11.3'))
Mar 13, 2019 in Ansible by Vinay

1 answer to this question.

0 votes

Run the following to upgrade setuptools under the python user:

pip install --upgrade setuptools --user python
answered Mar 13, 2019 by Haider

Related Questions In Ansible

0 votes
1 answer

Error while installing Ansible on Azure

There are few dependencies that you need ...READ MORE

answered Mar 26, 2019 in Ansible by Derryl
+2 votes
1 answer

getting error while installing ansible on redhat8

The same error is reported in this ...READ MORE

answered Dec 4, 2019 in Ansible by Raveendiran
• 960 points
0 votes
1 answer
+1 vote
3 answers
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
2 answers

Error while creating resource group on Azure using Ansible

Please check you indentation, remove all spaces ...READ MORE

answered Mar 17, 2020 in Ansible by Shrikant Yerge
0 votes
1 answer

Error when executing ansible playbook on Azure

Hey @Ganga, As the error message says, ...READ MORE

answered Jan 29, 2019 in Ansible by Kavya