Installing Prerequisites and the Mason Platform tools (CLI)


Please be advised that these instructions may not work for 100% of all cases. We’re working to ensure that we test our tools on various configurations in an ongoing basis. Please contact Mason Support in case you need assistance.

This page lists the software prerequisites to set up the Mason CLI (“Command Line Interface”) tool, used to access features of the Mason Platform. You will need:

  • Python 2 (version 2.7 or greater), but not Python 3.
  • The pip tool, required to install the Mason CLI
  • The git tool, a version control tool used by pip
  • The openssl security suite for APK signature verification


Python should be already pre-installed. Open Terminal from Applications, and type in python --version to confirm that it is available.

Please ensure your version of Python2 is 2.7 or greater. Python 3 is currently not supported.

Installing pip

pip is already installed if you’re using Python2 >= 2.7.9 binaries downloaded from, but you’ll need to upgrade pip.

You can check if pip is installed by typing in pip --version in Terminal. If you see a message with a version number, you should be OK:

$ pip --version
pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)

If not, you will need to install it. To do so, download this file first into the Downloads directory inside your Home directory. Then from Terminal you may install pip by typing:

python ~/Downloads/

See this page for more details.


Note that the git tool is provided via the Apple developer tools. This gets auto-installed during the installation of pip if not already detected on the system.

Installing the CLI tool

Once pip in installed, you can now install the Mason CLI from the command line like so:

  1. Open Terminal just as you did above.
  2. Type:
python -m pip install git+

If you see errors relating to permissions, you may need to run it instead as:

sudo python -m pip install git+


The instructions for Linux are the same as for OS X. Please use a terminal anywhere there is a reference to the Terminal app, and your home directory anywhere there is a reference to the Home directory.

git should already be available on most versions of Linux. Otherwise, you may need to install it via your system’s package management software (apt or yum for example).

Please ensure your version of Python2 is 2.7 or greater. Python 3 is currently not supported.

You may visit this page for details on installing pip that are most relevant to your situation.


The instructions below have been tested on Windows 7 and Windows 10, and should work for many cases but we’re unable to provide any additional support at this time.

Install Python

  1. Download the installer from this link.
  2. Run the downloaded installer file, and follow directions to install it into a directory, say c:\Python27.
  3. Press Windows+R and type cmd to open up the Windows command prompt.
  4. In the command prompt, type cd C:\Python27
  5. Then type python --version to confirm that it prints out the name and version of Python installed.

Install git

  1. Download git for Windows from
  2. Run the installer that you just downloaded and follow instructions. Ensure you select all options (especially any that refer to installation or setup of git bash which adds support for Unix tools such as grep, bash and openssl).
    1. When it prompts you about Adjusting your PATH environment, pick the option Use Git from the Windows Command Prompt
    2. For the prompt Configure the line ending conversions, choose the option Checkout Windows-style, commit Unix-style line endings
    3. For the prompt Configuring the terminal emulator to use with Git Bash, choose Use Windows’ default console window
    4. This video shows how to install git for Windows correctly to ensure you get the mason CLI running.
  3. When installation is complete, you will be offered the option of opening a Git bash window (a shortcut should also be created on your desktop). Ensure this is selected in order to get a bash window where you can use git as well as many Unix-like commands, and where you have access to openssl which is required to run some of the mason subcommands.

Git bash option

Setup pip

The Windows version of Python includes pip.

Install the CLI

You can now install the Mason CLI from the command prompt like so:

  1. In a new command prompt window (just like you used in step 4 and 5 above in section Install Python, make sure you’re still in the C:\Python27 folder: cd /D c:\Python27
  2. Then type python -m pip install git+ If you are prompted for a GitHub username and password, press Esc to ignore that and press <Enter> if prompted for a password. It should now proceed to install the tool.
  3. You can run the mason command as python -m mason to ensure it has been installed. Note that there is a mason.exe that will be generated and placed in C:\Python27\Scripts. You may create a Windows batch file named mason.bat that directly invokes this executable in order to run your mason tool to avoid typing python -m mason each time.