wiki:LinuxSingleStepInstaller

Version 10 (modified by toby, 9 months ago) (diff)

--

Installing GSAS-II for Linux with a Single-Step Download

A new approach for downloading and installing GSAS-II, along with required prerequisites has been developed using tools from Anaconda Inc. (previously Continuum Analytics) and their Anaconda free product. (Thanks Anaconda!.) Downloading one file (~300 Mb) provides: Python, a number of Python packages, and subversion (svn), which is then used to install GSAS-II. The svn program is also used to update GSAS-II (using the Help/Update menu command) as changes are made.

Step 1:

This file is recommended:

These are older installers that have worked, but please avoid them if possible:

Note that regardless of which installer you use above, after Python is installed, these self-installers will fetch the latest version of GSAS-II from our server. To get later updates of GSAS-II, use the Help/Update menu item within the GUI or run the bootstrap.py file.

Step 2:

Execute the downloaded file. This should be done by typing the command

bash <path>/gsas2full-Latest-Linux-x86_64.sh

in a terminal window. Then press Enter to run the command.

Note that alternately it is possible to use command

bash <path>/gsas2full-Latest-Linux-x86_64.sh -b -p ~/g2full

This will install the files at location g2full in your home directory and will skip Step 3, below. Note that this location is labeled as <condapath> in discussions below.

Step 3:

Answer prompts from the install script.

  1. Press enter to start the procedure
  1. Press enter to read through the copyright notice
  1. type "yes" to accept the copyright information and start the installation.
  1. Enter a location for where the files should be loaded, if the default is not OK and press enter. Note that this location is labeled as <condapath> in discussions below. If the default is OK, simply press enter. Problems have been reported when <condapath> includes spaces.
  1. Wait while the installation of Python, etc occurs. There will typically be a long delay while nothing happens followed by a series of messages as packages are installed.
  1. After Python and packages are installed, the GSASII/bootstrap.py file is invoked to update the GSAS-II files using program svn (subversion) from the APS server https://subversion.xray.aps.anl.gov/pyGSAS. Once the svn command is executed, updated versions of GSAS-II files are downloaded to provide the current GSAS-II version. If you have transferred the gsas2full-Latest-Linux-x86_64.sh file to a computer that does not have an internet connection or requires a proxy server to access the internet, this will fail. The installation will still complete, but you will have a somewhat older GSAS-II version. To update or establish proxy server information, rerun bootstrap.py (see below)
  1. The final question to be asked is should the installation location be placed into your system's path. Answering "no" is recommended (unless you plan to run other Python scripts from the command line with this version of Python, in which case you may want to type "yes".)

Step 4:

The Python and GSAS-II installation is now complete, and you can close the terminal window.

On some Linux distributions a shortcut will be created to run GSAS-II, for example on the desktop. On most others you will need to do this yourself.

Alternately, the command to run GSAS-II will be something like this

~/g2full/bin/python ~/g2full/GSASII/GSASII.py

changing the prefix ~/g2full/ to reflect your choice for <condapath>. With gsas2full-Latest-Linux-x86_64.sh from January 2021 and later, the installer creates file <condapath>/start_GSASII.sh. This file can be run to start GSAS-II with command

bash <condapath>/start_GSASII.sh

The file can be copied and used.

In case of problems

There are many, many versions of Linux and some are too new or old and will not have compatible .so libraries with either the GSAS-II code and/or Python. Sometimes installing compatibily libraries are needed. See the manual installation instructions for other ways install on Linux.

If you are able to download the gsas2full-Latest-Linux-x86_64.sh file, but the install does not run properly, you may not be executing the command properly. Please make sure you are typing bash correctly and leaving a space between that and the file name, also be sure you are allowed to write files to the location you choose for installation. If the installation fails, delete the previous installation directory before trying again.

Rerun bootstrap.py

With gsas2full-Latest-Linux-x86_64.sh from January 2021 and later, the installer creates file <condapath>/start_G2_bootstrap.sh which can be run in bash to launch the bootstrap process. Otherwise a command like this is needed:

~/g2full/bin/python ~/g2full/GSASII/bootstrap.py

changing the prefix ~/g2full/ to reflect your choice for <condapath>.

If GSAS-II is installed, this will complete any remaining installation steps and will update GSAS-II to the latest version. Note that this script requests the name of a proxy server. For most people, none is needed and they should simply use the the default by pressing return. However, some sites block web traffic unless it is passed through a particular computer. If needed, enter that computer name or IP address here (e.g. proxyout.lanl.gov); you will be then be requested to also supply a port number, which defaults to 8080. If you are able to download files but updates fail, see the discussion of web proxies.