Skip to main content

Section C.3 PIP Install

PIP, in the open source tradition of recursive acronyms, stands for “PIP Installs Packages”. This package manager helps you obtain software and keep it up-to-date. There are three packages that are indispensable for use with PreTeXt so you can practice doing installations now via your virtual environment.

In your virtual environment, go

(ptx) $ pip install lxml

Now you have a collection of Python routines that interface with the same base libraries for XSL processing as the xsltproc executable. A second library is requests which moderates communications with online servers and is necessary to communicate with WeBWorK servers and with a YouTube server that provides thumbnail images for static versions of videos. Finally, the pdfCropMargins package provides a tool that will crop images during their production with the pretext script.

Table C.3.1. PIP-installable Python Packages
Package Purpose

XSL processing


Communication with online servers


Crop images during production