...
- Python 2.7.4 32-bit (physics default)
- Python 2.7.13 64-bit (softegr default)
Warning |
---|
Please note that Python 2.7.x has reached end-of-life as of January, 2020 (see https://www.python.org/dev/peps/pep-0373/#id4). Python 2.7.13 deployment in the LCLS controls environment has been frozen as of March, 2021. |
Base Python Installation
The steps to install vanilla Python 2.7.x in LCLS production are as follows (examples use Python 2.7.13):
...
- Core packages: packages for installing and building Python packages from sources or binaries (e.g. pip, setuptools, wheel) [$python_home/src/core-packages]
- Site packages: packages obtained via the official Python Package Index (PyPI) repository ($python_home/src/site-packages)
- External packages: packages obtained from non-PyPI sources, such as GitHub or SourceForge ($python_home/src/external-packages)
- SLAC packages: packages created and/or maintained by SLAC entities ($python_home/src/slac-packages)
To install packages, run `pip install` and define the paths to the package source files with the --find-links option (note that pip will make a best effort tosatisfy dependencies, but this is by no :
From an internet-accessible machine, download the appropriate source tarballs (when available) from the appropriate sources:
Code Block language bash theme Midnight # Example: # Download source tarballs of all modules listed in requirements file to the destination directory $ pip download --dest=<download_directory> --no-binary :all: -r installed-modules.txt
- Copy the source files over to the appropriate directory in the Python 2.7.13 deployment tree (/usr/local/lcls/package/python/python2.7.13/linux-x86_64/src) depending on package origin (see below).
- run `pip install` and define the paths to the package source files with the --find-links option (note that pip will make a best effort to satisfy dependencies, but this is by no means guaranteed. The --find-links argument can be specified more than once to look for files in multiple locations. Barring this, the --no-deps argument can be used to ignore dependencies):
Code Block | ||||
---|---|---|---|---|
| ||||
# pip install --no-cache-dir --no-index --find-links=/path/to/module/source/dir [module_source|-r requirements.txt]
#
# Examples:
# Install using requirements file
$ pip install --no-cache-dir --no-index --find-links=/usr/local/lcls/package/python/python2.7.13/linux-x86_64/src/site-packages -r site-requirements.txt
# Install specific module (requires module tarball/wheel/egg file to be located in the directory specified by --find-links argument. If multiple packages
# match the name, the tarball/wheel/egg with the latest version number will be used.)
$ pip install --no-cache-dir --no-index --find-links=/usr/local/lcls/package/python/python2.7.13/linux-x86_64/src/site-packages six
# Install module from specific source file
$ pip install --no-cache-dir --no-index --find-links=/usr/local/lcls/package/python/python2.7.13/linux-x86_64/src/slac-packages pydm-1.11.0.tar.gz |
...