I\'m running Mac OS 10.6.8. and wanted to install in addition to python 2.6 also python 2.7 and use python 2.7 in a new virtualenv. I executed the following steps:
I
Even though there is an accepted answer I thought I would put what fixed it for me.
Firstly I installed Python and had just upgraded it via Homebrew. I am also using ZSH so if some bits don't quite match your output then that might be why.
By running brew info python and looking through the output I found the following nice bit of information:
If you wish to have this formula's python executable in your PATH then add
the following to ~/.zshrc:
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
So I added this to my terminal startup script as shown and the error n longer displays.
Note: I inserted this into another part of my PATH and the error persisted on start up.