Version 11 (modified by toby, 9 years ago) (diff)


Installing GSAS-II on Linux systems

To date we have done a bit of testing with Linux, but there are a lot of different Linux releases out there and we don't have a lot of experience yet. (Contributions to this page are welcome). At present, we are distributing only binaries compatible with Python 2.7 and 64 bit linux. These files require the library, so you may need to install the gfortran compliler to get this library. For 32-bit linux, etc., you will likely need to compile for yourself (see "Compiling Fortran Code" below).


Before you can install or use GSAS-II you will need two software packages installed: python and subversion. Installation of subversion is usually trivial with the distributed package managers, but python may be more complex, since we require several additional Python packages for GSAS-II. Instructions are provided below for Ubuntu on how to do this. An alternative to this is to install a package with Python and a bunch of commonly needed packages. We have been recommending the free Enthought Python Distribution (EPDfree), but that is being replaced by a new product CanopyExpress, which we have not tried yet. We develop GSAS-II ourselves using the commercially supported version, the Enthought Python Distribution (EPD), which is being replaced by Canopy, which we have also not tried yet. As I write this, the 64-bit EPDfree for linux is still available at this link from this page, Alternatives include Python(x,y) or ActiveState ActivePython. We simply have not tried the latter two, but if you do, make sure that you install all the required Python packages.

Simplified Installation

  1. Install subversion
  1. Install Python and required packages
  1. Create a directory where GSAS-II will be installed
  1. Download the installation script ( by using this URL:

or by using this command:

curl >

  1. Move the file into the directory where GSAS-II will be installed
  1. Run the script using the python package you have installed with command

<path1>python <path2>

Where <path1> is the location where python has been installed (may be omitted if in your path) and <path2> is the directory you created for GSAS-II

  1. The installation script will attempt to create a desktop icon for running GSAS-II, but this may not be appropriate for your linux configuration. If you want to create a shortcut, have it run <path1>python <path2> where the paths are defined as in step 6, above.

Note there are many other ways that python & GSAS-II can be installed, etc., depending on how well you understand the process. The above steps are simply a suggestion.

Compiling Fortran Code

Normally you will not need to do this, since GSAS-II comes with Linux binaries, but if you are a source-code purist or your system is unusually configured you may find that the binaries we provide do not work for you. In this case follow the next paragraph for building the binaries:

GSAS-II requires a small number of Fortran routines that are incorporated as Python packages (.so files). You will need the NumPy f2py routine and the compiler of your choice to build the code yourself. Both G77 (32-bit Python only) and GFortran have been successful on the platforms we have tried. To help with compiling the programs, launch the python scons program from inside the GSASII/fsource directory. If you are lucky, this routine will find the needed compiler and python program, set all options correctly for you and run all steps needed to prepare the .so files. This is done by

(1) opening a terminal window,

(2) use the cd command to set your working directory to <path2>/GSASII/fsource and

(3) simply typing "scons" in the window.

If you need to change any options, type "scons help" to see a list of the possible command-line arguments and the values for the options. For testing, help can be used with command-line options to see how they will change the variables.

Ubuntu 12 Install

from Dr. Thomas Malcherek (July 25, 2012):

Getting GSAS-II to run on a Linux Ubuntu installation (12.04 LTS) was actually quite simple and did not require the EPD packages. I had to install the following packages using apt-get:






Optional steps:

install scons with apt-get and recompile the fortran modules using that scons command

The latest WX packages can be obtained from after adding their repository to /etc/apt/sources.list

Fedora 18 Install

(from Bachir Aoun, May 2013)

Use yum to install:










It was not possible to use the distributed GSAS-II binaries on fedora core 18, so it was needed to recompile the fortran modules using the scons command

Ubuntu 12 Install

[InstallNotesUbuntu14 Notes] on installing Ubuntu 14.04