I am encountering this error and need to address it in about 20mins: ERROR! Unexpected Exception, this is probably a bug: No module named six

Please can someone give me a quick fix for the ERROR! Unexpected Exception, this is probably a bug: No module named six, as I’ve got 20 mins to fix it :worried:

A bit of background: I’ve recently updated ansible (2.5.4), vagrant (2.1.1) and python (2.7.15).

Any quick help in the simplest steps possible would be hugely welcomed!

Here’s the quick answer (I will revise):

pip install ansible==

or use brew:

brew switch ansible


Thanks @knowler, I’ll give that a try.

@fullyint pip was troublesome for me, so I switched to brew.

@Simeon +1, that would be very useful!

@knowler I can’t use brew switch, as I don’t have any other versions in the cellar. I tried running brew install version@ but it throws an error: No available formula with the name "ansible@".

For now I’ve installed via pip to push these urgent changes, then figure out a better plan for switching between versions. NB: pip doesn’t work for me for version 2.5.4, hence why I switched to brew.

Getting pip working would be the best for the future. TBH I still need to do this as well.

Interesting — and a bit aggravating — other than using brew switch, Homebrew does not support installing old formulas (out of the box).

Yes, that’s very frustrating!

Bumping an old thread (sorry) because I want this post to link to, with info for installing older versions of Ansible, whether using Homebrew or pip (see posts above for using pip to install older ansible).

To address the quote above regarding Homebrew, if your machine doesn’t have your target older version available for a brew switch [someversion], this procedure has worked for me in the past:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/<COMMIT-SHA-HERE>/Formula/ansible.rb

Of course, replace/insert <COMMIT-SHA-HERE>. For the example with efc15f6

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/efc15f6/Formula/ansible.rb