I have some scripts written in python on my computer. Those scripts require some external packages, such as google protobuf or pycrypto.
To install them, I used either pip or easy_install, as root. Now the problem is that some of those packages were only available when python was run as root: pretty annoying!
The solution is simple: fix the read and execute rights of the Python package directory:
sudo chmod -R ugo+rX /Library/Python/2.7/site-packages/
NB: this is for Python 2.7, you may need to adjust the path depending on which version you’re using.