You are here

Installing OpenMx

What computers run OpenMx?

You can run recent versions of OpenMx on computers using Windows, MacOS, and most varieties of Linux/GNU.

What do I need to do first?

In order to install the most recent version of OpenMx, you will need a recent version of R.

If you need to download R, it can be found at CRAN.

How do I install OpenMx?

The easiest way to install OpenMx is from CRAN: Just open up an R session and type:


You may need to restart R before you can load the freshly installed OpenMx package.

Advanced users: If you want to install the version of OpenMx which uses the NPSOL optimizer,
copy the following line into the R command line and press return.


OS X Users Note: An earlier version of the NPSOL-enabled version of OpenMx for OS X required the file libgfortran.3.dylib to be in /usr/local/lib because if it isn't the annoying message appears when one tells R 'library(OpenMx)'. This issue has been resolved and should no longer occur.

Error: package or namespace load failed for ‘OpenMx’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/OpenMx/libs/':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/OpenMx/libs/, 6): Library not loaded: /usr/local/lib/libgfortran.3.dylib

The library file in question can be found and downloaded here:

Assuming that one is in the directory to which the file is downloaded (start Terminal, cd ~/Downloads or wherever), the file can be installed with the following command:

sudo cp libgfortran.3.dylib /usr/local/lib/


Now you should be ready to take a look at the Tutorial User Guide.

Also, take look at other packages such as metaSEM and umx and others that extend the functionality of OpenMx.

Developers. If you are interested in building OpenMx from source, instructions are here.