2.4. Pip Installation

As of MFiX 20.1, Python wheels are available for installation with Pip. (Installation via the Conda packages will continue to be supported.)

The Pip package includes the MFiX GUI and the MFiX solver source. It does not include a local copy of the MFiX documentation or a binary version of the solver. If you install MFiX with Pip, you will need to build a solver yourself.

Python 3.7 is required, because at the time of this writing, VTK packages for Python 3.8 are not available from PyPI.

The Pip package should work on any platform, so long you have Python 3.7, CMake, GNU Make, and a Fortran compiler.

2.4.1. Install MFiX

Make sure Python 3.7 or later is installed, either from your system package manager or from Python.org.

  1. Browse to MFiX Download (requires registration and login)

  2. Go to the Source tab

  3. Download either the source tarball or the wheel (*.whl) file.

  4. Install the downloaded file with pip.

> python3 -m pip install mfix-21.1.4.tar.gz
#  <or>
> python3 -m pip install mfix-21.1.4-py3-none-any.whl

MFiX runs the same whether installed from a source tarball or wheel. The source tarball is better for looking at the source. The wheel file installs slightly faster.

Warning

The install command assumes your intended Python command is python. If python on your system is Python 2.x or for any other reason is not your intended Python version, then edit the pasted command in your shell to start with python3, python3.7, or whatever the full path is to your intended Python distribution to remove any uncertainty.

2.4.2. Install Solver Build Dependencies (optional)

The MFiX wheel is a pure Python package, and does not include a solver binary. To actually run the solver, you will need:

  • Fortran 2003 compiler (GFortran 4.8 or later recommended)

  • GNU Make

  • CMake

  • For DMP support, an MPI implementation (such as OpenMPI)

Installing the compiler, CMake, and Make through your system package manager (such as apt or yum) is recommended.

Note

If your system package manager has an old version of CMake, you can install a recent version with python -m pip install cmake.

On Windows, the Scoop tool can be used to install build dependencies for MFiX.

> scoop install gcc  # install full MinGW installation, including MinGW Make
> scoop install cmake

2.4.3. Run MFiX

To run MFiX:

  1. Open a terminal

  2. Run mfix⏎ to start MFiX

You are now ready to proceed to the First Tutorial and Tutorials.

2.4.4. Uninstall MFiX

To uninstall MFiX:

> pip uninstall mfix