Source Install

Dependencies

PyNE has the following dependencies:

Optional Depenendencies:
  1. MOAB

  2. DAGMC

  3. OpenMC

To run tutorial and examples:
  1. jupyter

Many, if not all of these dependencies can be installed using a package manager (i.e. apt-get on Linux, MacPorts or Homebrew on MacOS, or Anaconda on both, etc.)

Most common install flags:

The list of the possible flags can be retrieved using:

python setup.py –help

  1. optional arguments:

-h, --help: show this help message and exit

--clean: removes the build directory before continuing.

--user: Installs into ~/.local

  1. cmake: CMake arguments.

-D VAR: Set environment variable.

--build-type BT: Set build type via CMAKE_BUILD_TYPE, e.g. “release” or “debug”.

--deps-root DEPS_ROOT: The path to the directory containing all dependencies

--fast: (default) Will try to compile from assembly, if possible. This is faster than compiling from source.

--slow: Will NOT try to compile from assembly, if possible. This is slower as it must compile from source.

  1. make: Make arguments.

-j J: Degree of parallelism for build.

  1. other/dependencies:

--hdf5 HDF5_PATH: Path to HDF5 root direcitory.

--moab MOAB_PATH: Path to MOAB root directory.

--dagmc DAGMC_PATH: Path to DAGMC root directory.

--prefix INSTALL_PATH: Prefix for install location.

--build-dir BUILD_DIR: where to place the build directory

--bootstrap: Bootstraps the PyNE installation, including nuc_data_make and possibly decaygen.

Most of the dependencies are readily available through package managers. Once all the dependencies are installed, PyNE can be installed. Download and unzip the source (zip, tar) or checkout a verison from the PyNE repository (Github). Then run the following commands from the directory above the unzipped directory:

cd pyne/
python setup.py install --user
cd
nuc_data_make

The setup.py command compiles and installs the PyNE source code. Note that this command must be done in the top PyNE directory. The nuc_data_make builds and installs a database of nuclear data. This must be done as a second step because most nuclear data is under some form of license restriction or export control which prevents the developers from distributing it with PyNE. However, the nuc_data_make program (which is installed by setup.py) will do its best to find relevant nuclear data elsewhere on your machine or from public sources on the internet.