wiki:InstallLinux-prev

Version 17 (modified by toby, 4 years ago) (diff)

--

Installing GSAS-II on Linux systems

We do some testing of GSAS-II on Linux and it does work as far as we are aware (please do report problems), but with the wide variety of Linux dists, we cannot test installation on vary many.

We supply a single-step download and install option based on the Continuum, Inc. miniconda installer. See these instructions. We have not yet heard from anyone who has problems with this, but are not sure of how much testing has been done.

Note that we distribute binaries that require the libgfortran.so library. You should be able to install this for your system without installing the gfortran compliler, but details will vary with your flavor of Linux. Google fedora install libgfortran or the equivalent for hints.

Installing the easy way

See these instructions.

Installing the hard way

You may instead wish to use distribution-supplied builds of Python and packages. Be sure to use Python 2.7. We do not provide a distribution for 32-bit Linux, so if you have that (why would you?) you will need to find your own Python dists. Also, if you want to build the binary files, you will need to install gfortran (see "Compiling Fortran Code" below).

Overview

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, https://www.enthought.com/repo/free/. 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 (bootstrap.py) by using this URL:

https://subversion.xray.aps.anl.gov/trac/pyGSAS/browser/install/bootstrap.py?format=txt

or by using this command:

curl https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py > bootstrap.py

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

<path1>python <path2>bootstrap.py

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>GSASII.py where the paths are defined as in step 6, above.
  1. If you are installing GSAS-II on a server and want to download binary files for all supported platforms, use

<path1>python <path2>bootstrap.py -server

or equivalently

<path1>python <path2>bootstrap.py -allbinaries

Note there are many other ways that python & GSAS-II can be installed, 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.

Notes for various Linux dists

Fedora 18 Install

(from Bachir Aoun, May 2013)

Use yum to install:

python-scipy

python-wxgtk2.8

python-wxtools

wx2.8

python-opengl

python-matplotlib

python-matplotlib-wx

scons

gfortran

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

Note that by default, Ubuntu uses a desktop manager called Unity that to conserve space does not reserve space for menu bars on applications. Instead by default, it places the menu items at the top of the screen and only when the mouse is moved to that location. This does not work that well with GSAS-II. Starting with 14.04, this behavior can be changed, see installNotesUbuntu14

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:

python-scipy

python-wxgtk2.8

python-wxtools

wx2.8-i18n

python-opengl

Optional steps:

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

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

Ubuntu 14 Install

Here are Notes on installing Ubuntu 14.04