Version 7 (modified by toby, 16 months ago) (diff)


Installing GSAS-II via conda (Anaconda Python)

Python enthusiasts are likely quite familiar with the Anaconda package manager. GSAS-II can be installed using a simple conda command, after installing anaconda or miniconda. We are recommending Python 3.7. With Python 3.8 or later, you will likely need to compile binaries. When this conda package is used, it ensures that the packages required by GSAS-II are installed, including subversion, and then subversion is used to download the latest version of GSAS-II from the APS server. This download will fail if your computer network requires a proxy (more info on proxies here), but rerunning the command (see bottom of this page) will work after the proxy information is entered.

conda install gsas2pkg=1.1 -c briantoby

To use a separate conda environment for GSAS-II, use these commands to install GSAS-II:

conda create -n GSASII
conda install gsas2pkg=1.1 -c briantoby -n GSASII

Note that you may need to activate the environment manually before starting GSAS-II.

After the conda install completes, one of the following occurs:

  • On the Mac, an app is created that can be dragged to the doc (or create a shortcut to and drag that anywhere).
  • On Windows a desktop shortcut is created.
  • On Linux (at present) the command-line is needed to start GSAS-II:
    <condapath>/bin/python <condapath>/GSASII/

Activating: If you get an error that conda is an unknown command, this means anaconda/miniconda is not in your path (which is my recommended way to install anaconda) and you will need to first use the ananconda activate command:


source <condapath>/bin/activate



With GSAS-II in an environment, the activate command becomes ...activate GSASII

Python 2.7: We are no longer confirming that all sections of GSAS-II are compatible with Python 2.7 (but will usually fix problems, if reported). An older version of gsas2pkg is compatible with Python 2.7:

conda install gsas2pkg=1.0.6 -c briantoby 

GSAS-II Updates

Note that updates to GSAS-II are not integrated into conda and are not coupled to the specific versions of Python packages you have loaded. To obtain the latest version GSAS-II (you are strongly recommended to update regularly) use the Help/Update menu command or rerun the script using this command:

<condapath>/bin/python <condapath>/GSASII/