This installation guide provides step-by-step instructions to install mtools on Ubuntu Desktop version 12.04 64-bit (link to .iso image).

Overview

This is an overview of the steps required to install mtools with all dependencies. The steps are listed in detail below.

  1. Update System
  2. Install Python setuptools, pip, development headers
  3. Install MongoDB
  4. Install pymongo
  5. Install matplotlib
  6. Install mtools

Steps 3 and 4 are optional dependencies, required for mlaunch. Step 5 is an optional dependency, required for mplotqueries.

Installation Steps in Detail

1. Update System

Make sure that your system is up to date with the latest packages.

  1. Open Update Manager
  2. Click "Install Updates"
  3. When prompted for your password, enter it
  4. Let the Update Manager install all updates
  5. Close Update Manager

2. Install Python setuptools, pip and development headers

  1. Open Terminal
  2. Run sudo apt-get install build-essential python-setuptools python-dev python-pip
  3. When prompted for your password, enter it
  4. Confirm installation with y

3. Install MongoDB

  1. Follow the steps provided in the MongoDB Manual to Install MongoDB on Ubuntu.
  2. Confirm that the installation succeeded by typing mongo --version. You should see output similar to this:
MongoDB shell version: 2.6.1

4. Install pymongo

  1. Run sudo pip install pymongo
  2. Verify that the installation was successful with python -c "import pymongo; print pymongo.version". It should print out version 2.7.1 or higher.

5. Install matplotlib

The matplotlib package for Ubuntu 12.04 is not up to date and will install matplotlib 1.1.1rc. We'll use apt-get to install all the dependencies but then install matplotlib with pip.

  1. Run sudo apt-get install libpng-dev libjpeg8-dev libfreetype6-dev
  2. Confirm installation with y
  3. Upgrade distribute to a newer version with sudo easy_install -U distribute
  4. Install matplotlib with sudo pip install matplotlib
  5. Verify that installation was successful with python -c "import matplotlib; print matplotlib.__version__". It should print out the version 1.3.1 or higher.

Note: This will take several minutes installing all the required dependencies and output a lot of scary looking warnings.

6. Install mtools

  1. Run sudo pip install mtools
  2. Verify that you have all the dependencies installed by running mplotqueries --version. It should print out mtools version 1.1.5 (or above), and no warning about not finding matplotlib.