Python Management

This document describes how to install and manage Python and required modules for accelerator controls. Let's take Python-2.7.4 for example.

Main steps –

From your own private account, download and install python, python modules on one of our machines that has access to Internet. Create a repository of modules. Test and Verify the Python installation.

Create required directory structure for installing new python version on Dev. Using the repository and source files from the above step, install python and associated modules (applicable to Dev environment). Test and verify the Python installation.

Create required directory structure for installing new python version on Prod. Using the repository and source files from the above step, install python and associated modules (applicable to Prod environment). Test and verify the Python installation.

Install Python-2.7.4

on one of our machines that has an access to Internet (e.g., lcls-dev3)
cd /scratch/jingchen/python; mkdir python2.7.4

cd python2.7.4; mkdir build;mkdir src
(Building in separate build directories brings about many advantages over building in-source. For example, by separating src from build, one can have multiple builds, each with different configuration)

Create a tar archive of scratch/jingchen/python/python2.7.4/src/Python-2.7.4-files/download directory. This is repository of modules and we will use this for installing modules under Dev and Prod environment