Skip to content

Python setup in Ubuntu & OS X

aunindadf edited this page Feb 24, 2020 · 15 revisions

On a fresh Ubuntu or OS X box (either locally on on AWS)....

Step 1: Update the box and install necessary dependencies (python, git, dev tools)

In Ubuntu (We tested on Ubuntu Server 18.04 LTS)

$ sudo apt-get update

$ sudo apt-get install pip

$ sudo apt-get install python3-pip

$ pip3 install pandas

In OS X (Tested in macOS Mojave 10.14.6)

(if you don't have Homebrew, install it first)

$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

$ brew install git

Install Python 3

$ brew install python3

Install python package manager pip

$ curl -O http://python-distribute.org/distribute_setup.py

$ python distribute_setup.py

$ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py

$ python get-pip.py

Step 2: Initiate a git repository locally and pull this repository to local machine

Create an empty directory

$ mkdir dcm-graph

Switch to the newly created directory

$ cd dcm-graph

Initiate git in the empty repo

$ git init

Pull the remote dcm-graph repository to local machine

$ git remote add origin https://github.com/DFID/dcm-graph.git