Ubuntu Installation - QuantSoftware/QuantSoftwareToolkit GitHub Wiki

This is documentation of the step by step installation process for QSTK on Ubuntu. The process has been completely tested on 12.04 and testing on other environments is still pending. This method can easily be ported to other linux dependencies as well.

The recommended process for installation of python dependencies and installation is using Apt-get and pip.

  1. Updating apt-get:

     sudo apt-get update
    

    This will update the list of repositories apt-get looks at for the package.

  2. Install Numpy, Scipy, Matplotlib

    Installing Numpy, Scipy and Matplotlib using apt-get as that is the most robust method of installation among pip, easy_install and apt-get.

     sudo apt-get install python-numpy
     sudo apt-get install python-scipy
     sudo apt-get install python-matplotlib
    
  3. Install python development tools

Install python development tools, setup tools and pip. Pip is used for installing packages using Pypi.

    sudo apt-get install python-dev
    sudo apt-get install python-setuptools
    sudo apt-get install python-pip
  1. Install QSTK dependencies:

    Install Pandas, Scikit-learn etc using pip. We install cvxopt using apt-get because the installation of cvxopt using pip has issues and is not robust.

     sudo pip install pandas
     sudo pip install scikits.statsmodels
     sudo pip install scikit-learn
     sudo apt-get build-dep python-cvxopt
     sudo apt-get install python-cvxopt
    
  2. Install QSTK using pip:

    Now that we have installed all the major dependencies we will finally install QSTK.

     sudo pip install QSTK
    
  3. Downloads Examples and Using QSTK.

    Install Unzip if needed.

     sudo apt-get install unzip
    

    Create a directory named QSTK

     mkdir ~/QSTK
     cd ~/QSTK
    

    Download the examples zip file from the class website.

     wget https://spark-public.s3.amazonaws.com/compinvesting1/QSTK-Setups/Examples.zip
     unzip Examples.zip
    

    Now we have downloaded the examples for QSTK. Lets validate the installation first to make sure everything is in place.

     python Validation.py
    

    Now that the validation is a success. Lets test drive QSTK.

     python Basic/tutorial1.py
    

    You should see pdfs created in the ~/QSTK/Basic directory. Which can be opened using finder or using the gnome-open file2open.pdf command or evince file2open.xxx.

  4. Uninstalling QSTK.

     sudo pip uninstall QSTK
     rm -rf ~/QSTK