Presentation Supercomputing Computer Database SIEpedia IT News

Follow @SIEie_IAC
Logo SIE

Python modules

The Python version currently installed is v3.8, running on Ubuntu 18.04.

While the Ubuntu repositories provided a vast array of Python modules, many of them are a few versions behind the latest one, and some modules commonly used in astronomy are missing. We maintain an up-to-date list of Pyhton 3 modules, which can be enabled by loading the Python 3.8 module: module load Python/3.8.

Here goes a (partial) list of the most important modules installed here in our Linux network. A complete list of all installed modules can be obtained by typing /usr/bin/python3.8 -m pip list --format=columns
If you need a module not yet installed, or wish to upgrade some of those listed here, please just let us know.

Note on Python 2.7: We also maintain a Python 2.7 installation, in order to run PyRAF. Only basic Python 2.7 modules are available, and no upgrades are being done.

Package  Version Description
APLpy 2.1.0 Python module aimed at producing publication-quality plots of astronomical imaging data in FITS format.
Usage: import aplpy
astropy 5.1 Community effort to develop a single core package for Astronomy in Python and foster interoperability between Python astronomy packages.
Usage: import astropy
beautifulsoup4 4.11.1 Library that makes it easy to scrape information from web pages. It sits atop an HTML or XML parser, providing Pythonic idioms for iterating, searching, and modifying the parse tree.
Usage: from bs4 import BeautifulSoup
Cython 0.29.30 Language that makes writing C extensions for the Python language as easy as Python itself. Cython is the ideal language for wrapping external C libraries, and for fast C modules that speed up the execution of Python code.
Usage: import cython
emcee 3.1.2 emcee is an extensible, pure-Python implementation of of Goodman & Weare's Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler.
Usage: import emcee
Ginga 3.3.0 Toolkit designed for building viewers for scientific image data in Python, visualizing 2D pixel data in NumPy arrays.
Usage: at the command prompt type ginga
Glueviz 1.2.0 Python library to explore relationships within and among related datasets.
Usage: at the command prompt type /usr/pkg/python/python3.6/bin/glue
h5py 3.7.0 General-purpose Python interface to the Hierarchical Data Format library, version 5 (HDF5 is a versatile, mature scientific software library designed for the fast, flexible storage of enormous amounts of data).
Usage: import h5py
healpy 1.15.2 Package to manipulate healpix maps.
Usage: import healpy
IPython 8.4.0 Provide an interactive shell superior to Python's default. IPython has many features for object introspection, system shell access, and its own special command system for adding functionality when working interactively. It tries to be a very efficient environment both for Python code development and for exploration of problems using Python objects (in situations like data analysis).
Usage: at the command prompt type ipython
Keras 2.8.0 High-level neural networks API.
Usage: import keras
lmfit 1.0.2 Library for least-squares minimization and data fitting in Python.
Usage: import lmfit
matplotlib 3.4.1 Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms.
Usage: see the matplotlib User's Guide and other documentation in
MDP 3.6 The Modular toolkit for Data Processing is a collection of supervised and unsupervised learning algorithms and other data processing units that can be combined into data processing sequences and more complex feed-forward network architectures.
Usage: import mdp
mpi4py 3.1.3 Package that provides bindings of the Message Passing Interface (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors.
Usage: import mpi4py
NetworkX 2.5.1 Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.
Usage: import networkx
nose 1.3.7 Alternate test discovery and running process for unittest, one that is intended to mimic the behavior of py.test as much as is reasonably possible without resorting to too much magic.
Usage: import nose
numdifftools 0.9.40 Suite of tools to solve automatic numerical differentiation problems in one or more variables.
Usage: import numdifftools
numexpr 2.8.1 The numexpr package evaluates multiple-operator array expressions many times faster than NumPy can.
Usage: import numexpr
NumPy 1.22.4 Numerical Python adds a fast and sophisticated array facility to the Python language.
Usage: import numpy
pandas 1.4.2 Open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.
Usage: import pandas
paramiko 2.11.0 module for python that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines
Usage: import paramiko
pep8 1.7.1 Tool to check your Python code against some of the style conventions in PEP 8.
Usage: type pep8 --help for usage help
pexpect 4.8.0 Pexpect is a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. Pexpect works like Don Libes' Expect. Pexpect allows your script to spawn a child application and control it as if a human were typing commands.
Usage: import pexpect
photutils 1.3.0 Affiliated package of Astropy to provide tools for detecting and performing photometry of astronomical sources.
Usage: import photutils
Pycairo 1.16.2 Set of Python bindings for the cairo graphics library.
Usage: import cairo
pyds9 1.8.1 The pyds9 module uses a Python interface to XPA to communicate with ds9. It supports communication with all of ds9’s XPA access points.
Usage: import ds9
PyEphem 4.1.3 PyEphem provides scientific-grade astronomical computations for the Python programming language.
Usage: import ephem
PyFITS 3.4 PyFITS provides an interface to FITS formatted files under the Python scripting language and PyRAF, the Python-based interface to IRAF. It is useful both for interactive data analysis and for writing analysis scripts in Python using FITS files as either input or output.
Usage: import pyfits
PyGObject 3.26.1 Python dynamic module that enables developers to use the power of GObject, which is part of the GNOME platform.
Usage: import gi
pylint 2.8.2 Python tool that checks if a module satisfies a coding standard.
Usage: at the comman prompt type pylint --help (or pylint-gui to work with a GUI)
PyMC 3.11.5 Package that implements the Metropolis-Hastings algorithm as a python class
Usage: import pymc3
PyNeb 1.1.15 The last in a lineage of tools dedicated to the analysis of emission lines, which includes FIVEL and nebular.
Usage: import pyneb
pyparsing 2.4.7 Alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions.
Usage: import pyparsing
PyQt 5.12.3 Set of Python bindings for the Qt application framework.
Usage: import PyQt5
pyregion 2.0 Python module to parse ds9 region files. It also supports ciao region files.
Usage: import pyregion
PyTables 3.6.1 Package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data.
Usage: import tables
PyWavelets 1.1.1 Free Open Source wavelet transform software for Python programming language.
Usage: import pywt
rdiff-backup 1.2.8 rdiff-backup backs up one directory to another, possibly over a network. The target directory ends up a copy of the source directory, but extra reverse diffs are stored in a special subdirectory of that target directory, so you can still recover files lost some time ago.
Usage: at the command prompt type rdiff-backup
ReportLab 3.6.10 Industry-strength PDF generating solution.
Usage: please see the ReportLab User Guide
RPy2 3.5.2 Very simple, yet robust, Python interface to the R Programming Language. It can manage all kinds of R objects and can execute arbitrary R functions (including the graphic functions). All errors from the R language are converted to Python exceptions.
Usage: import rpy2 (be careful, import rpy2, nor rpy).
scikit-image 0.19.3 Collection of algorithms for image processing.
Usage: import skimage
scikit-learn 1.1.1 Simple and efficient tools for data mining and data analysis.
Usage: import sklearn
SciPy 1.8.1 Set of Open Source scientific and numeric tools for Python, layered on top of NumPy.
Usage: see the Scipy Documentation
Sphinx 5.0.2 Tool that makes it easy to create intelligent and beautiful documentation.
Usage: from the unix prompt type sphinx-build, sphinx-autogen or sphinx-quickstart
Spyder 5.3.1 Powerful interactive development environment for the Python language with advanced editing, interactive testing, debugging and introspection features.
Usage: type spyder3
statsmodels 0.12.2 Module that allows users to explore data, estimate statistical models, and perform statistical tests.
Usage: import statsmodels
SymPy 1.10.1 Python library for symbolic mathematics.
Usage: at the command prompt type isympy
tensorflow 2.8.0 Open-source software library for Machine Intelligence
Usage: import tensorflow
testtools 2.5.0 Extensions to the Python standard library unit testing framework
Usage: import testtools
uncertainties 3.1.6 Free, cross-platform program that transparently handles calculations with numbers with uncertainties
Usage: import uncertainties
Urwid 2.0.1 Console user interface library for Python.
Usage: import urwid
wxPython 4.0.1 GUI toolkit for the Python programming language that allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. Usage: import wx