Installation of RBTools using pip can fail on macOS El Capitan and above with the following message:

OSError: [Errno 1] Operation not permitted: '/tmp/pip-Z1jzkn-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

We depend on the six package, which is used to help with making Python modules compatible with Python 2.x and 3.x. macOS's default version of Python pre-installs an old version of six, which cannot be removed from the filesystem. This breaks the installation of any Python packages depending on six when using pip, which will try to delete the old version and install a new version.

(If you have a custom version of Python installed from or homebrew, you should not hit this problem.)

There are two ways to work around this:

1. Upgrade six manually without deleting the old version.

This can be done by running:

$ sudo pip install -U --ignore-installed six

You can then install RBTools normally:

$ sudo pip install -U RBTools

2. Install RBTools using easy_install

easy_install is an older package tool for Python. One advantage over pip, in this case, is that it won't try to remove the old version of six, but will instead install a new copy alongside the old one. You can install RBTools by running:

$ sudo easy_install -U RBTools