GSAS-II logo

1.6.2. Customized Python Installation

Experienced system managers or code developers may wish to perform their own Python installations. Noting that the GSAS-II GUI requires at a minimum wxPython, matplotlib, PyOpenGL, NumPy and SciPy be installed, while for scripting use, only NumPy and SciPy are required. For full functionality, several other optional packages are needed, as is discussed in the GSAS-II Python package requirements. If Python versions other than those recommended are selected (Python=3.11 and NumPy=1.26), you will likely need to either locate older binaries and install them manually or run the compilation yourself (see compilation information).

The choices for how to install Python and packages come down to distribution methods such as conda, pip, homebrew or Linux distro-supplied installation. It is also possible to obtain all as source code and compile them locally.

1.6.2.1. conda

With conda, use commands such as this:

conda install python=3.11  numpy=1.26 wxpython scipy matplotlib pyopengl pillow h5py imageio requests git gitpython -c conda-forge

or:

conda create -n <envname> python=3.11  numpy=1.26 wxpython scipy matplotlib pyopengl pillow h5py imageio requests git gitpython -c conda-forge

1.6.2.2. pip

For pip (PyPI) installation, download and install Python from https://www.python.org/downloads/ (the 3.11 version is recommended) and then use a Python pip command similar to this:

pip install numpy wxpython scipy matplotlib pyopengl pillow h5py imageio requests gitpython

1.6.2.3. homebrew

Homebrew is one of several installers that will install a OS-specific complied software package or will download, compile and install the package from source code. See help information for that installer.

1.6.2.4. Distro-supplied packages

A small number of users or sites prefer to use Python distributions supplied via a Linux distribution, such as from Ubuntu, Debian or Redhat. As an example for how this is done, please see some older notes on installation with the Raspberry Pi OS: https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/InstallPiLinux.