Python for Finance: Analyze Big Financial Data

(Elle) #1

Python Deployment


This section shows how to deploy Python locally (or on a server) as well as via the web


browser.


Anaconda


A number of operating systems come with a version of Python and a number of additional


libraries already installed. This is true, for example, of Linux operating systems, which


often rely on Python as their main language (for packaging, administration, etc.).


However, in what follows we assume that Python is not installed or that we are installing


an additional version of Python (in parallel to an existing one) using the Anaconda


distribution.


You can download Anaconda for your operating system from the website


http://continuum.io/downloads. There are a couple of reasons to consider using Anaconda


for Python deployment. Among them are:


Libraries/packages


You get more than 100 of the most important Python libraries and packages in a


single installation step; in particular, you get all these installed in a version-consistent


manner (i.e., all libraries and packages work with each other).


[ 6 ]

Open source


The Anaconda distribution is free of charge in general,


[ 7 ]

as are all libraries and


packages included in the distribution.


Cross platform


It is available for Windows, Mac OS, and Linux platforms.


Separate installation


It installs into a separate directory without interfering with any existing installation;


no root/admin rights are needed.


Automatic updates


Libraries and packages included in Anaconda can be (semi)automatically updated via


free online repositories.


Conda package manager


The package manager allows the use of multiple Python versions and multiple


versions of libraries in parallel (for experimentation or development/testing


purposes); it also has great support for virtual environments.


After having downloaded the installer for Anaconda, the installation in general is quite


easy. On Windows platforms, just double-click the installer file and follow the instructions.


Under Linux, open a shell, change to the directory where the installer file is located, and


type:


$   bash    Anaconda-1.x.x-Linux-x86[_64].sh
Free download pdf