Install with conda

$ conda install -c conda-forge -c mosdef -c omnia mbuild

Alternatively you can add all the required channels to your .condarc after which you can simply install without specifying the channels:

$ conda config --add channels omnia
$ conda config --add channels mosdef
$ conda config --add channels conda-forge
$ conda install mbuild


The order in which channels are added matters: conda-forge should be the highest priority as a result of being added last. In your .condarc file, it should be listed first.


The MDTraj website makes a nice case for using Python and in particular the Anaconda scientific python distribution to manage your numerical and scientific Python packages.

Install with pip

$ pip install mbuild


PACKMOL is not available on pip but can be installed from source or via conda.

Install an editable version from source

$ git clone
$ cd mbuild
$ pip install -e .

To make your life easier, we recommend that you use a pre-packaged Python distribution like Continuum’s Anaconda in order to get all of the dependencies.

Supported Python Versions

Python 3.6 and 3.7 are officially supported, including testing during development and packaging. Support for Python 2.7 has been dropped as of August 6, 2019. Other Python versions, such as 3.8 and 3.5 and older, may successfully build and function but no guarantee is made.

Testing your installation

mBuild uses py.test for unit testing. To run them simply type run the following while in the base directory:

$ conda install pytest
$ py.test -v