ML4T Software Installation

From Quantitative Analysis Software Courses
Jump to navigation Jump to search


The information on this page is for those who are interested to have a Python development environment on their own machine. Keep in mind that even if you set up your own environment, your code still MUST run correctly on the GT servers, so it is very important that you ensure that you have access to them. Please see ML4T_Software_Setup for information on how to use those servers, and how to check out the code scaffolding for the projects.


Important notes

  • We use a specific, static dataset for this course, which we will provide. If you download your own data from Yahoo (or elsewhere), you will get wrong answers on assignments.
  • While these instructions should work for either Windows, macOS, or Linux, we strongly recommend developing on recent versions of Ubuntu LTS, as there may be significant differences on Windows. You can easily create an Ubuntu based virtual machine image to develop on using any freely available VM software (VirtualBox is probably the easiest and cheapest).
  • Regardless of your OS and install method, you should still ensure that your code runs on the provided servers. If your code fails to run on the servers, "it works on my machine" is not a valid excuse, and you will receive no credit.

The assignments in this class are in Python (version 2.7), and rely heavily on a few important libraries. These libraries are under active development, which unfortunately means there can be some compatibility issues between versions. This isn't an issue if you use the provided servers, but if you want to work from your local machine it is very important to make sure you have exactly the same library versions. To that end, here is a list of each library and its version number, provided in the pip freeze format:


If you are familiar with pip and virtualenv you can use this to create a virtualenv for this class which matches those version numbers. Here is an outline:

  1. Install virtualenv (if it is not already installed): python -m pip install --user virtualenv
  2. Create a viritual environment for this class: virtualenv ml4t-venv
  3. Activate the new virtual environment: source ml4t-venv/bin/activate on Linux or macOS, ml4t-venv/Scripts/activate.bat on Windows.
  4. Save the above list as a text file, say ml4t-libraries.txt
  5. Install the libraries using the requirements file you just saved: python -m pip install --requirement ml4t-libraries.txt

This will install virtualenv using pip, create a virtual environment in the current directory named ml4t-venv, and use pip to install the library versions listed above into that virtual environment. It requires pip which is provided by default on both macOS and Ubuntu, and comes packaged with the standard Python install for Windows. Certain backends for matplotlib may require additional libraries be installed in a platform specific way (on Ubuntu, sudo apt install python-tk should do the trick). More information on each of the tools mentioned on this page can be found here:

Optional software