Mortar provides Python 2.7 for writing Luigi Tasks and Pig User-Defined Functions (UDFs). This means that you have access to a wide range of third party libraries to make writing your Luigi and Pig jobs easier.
In addition to the Python Standard Library, Mortar comes pre-installed with several Python libraries often used for data science and data pipelines:
Mortar supports installing any Python library that can be installed by pip, including private packages stored in your S3 bucket.
For jobs that are run on the Mortar service, you can install additional Python libraries from the Python Settings tab under My Settings.
For jobs that you are running locally you will need to define your dependencies in the root directory of your Mortar project in a file called requirements.txt.
Here are some examples of how to define a Python dependency:
Version 2.1 of python-dateutil
Version 2.1 or higher of python-dateutil
Latest version of python-dateutil
Your private library stored in S3