Installing Python for BAG¶
This section describes how to install Python for running BAG.
Installation Requirements¶
BAG is compatible with Python 3.5+ (Python 2.7+ is theoretically supported but untested), so you will need to have Python 3.5+ installed. For Linux/Unix systems, it is recommended to install a separate Python distribution from the system Python.
BAG requires multiple Python packages, some of which requires compiling C++/C/Fortran extensions. Therefore, it is strongly recommended to download Anaconda Python, which provides a Python distribution with most of the packages preinstalled. Otherwise, please refer to documentation for each required package for how to install/build from source.
Required Packages¶
In addition to the default packages that come with Anaconda (numpy, scipy, etc.), you’ll need the following additional packages:
subprocess32 (Python 2 only)
This package is a backport of Python 3.2’s subprocess module to Python 2. It is installable from
pip
.-
This is a dependency of OpenMDAO. It is installable from
pip
. -
This is a flexible optimization framework in Python developed by NASA. It is installable from
pip
. mpich2 (optional)
This is the Message Passing Interface (MPI) library. OpenMDAO and Pyoptsparse can optionally use this library for parallel computing. You can install this package with:
> conda install mpich2
mpi4py (optional)
This is the Python wrapper of
mpich2
. You can install this package with:> conda install mpi4py
ipopt (optional)
Ipopt is a free software package for large-scale nonlinear optimization. This can be used to replace the default optimization solver that comes with scipy. You can install this package with:
> conda install --channel pkerichang ipopt
pyoptsparse (optional)
pyoptsparse
is a python package that contains a collection of optmization solvers, including a Python wrapper aroundIpopt
. You can install this package with:> conda install --channel pkerichang pyoptsparse