Changes between Version 3 and Version 4 of InstallLinux


Ignore:
Timestamp:
Sep 17, 2018 5:10:34 PM (5 years ago)
Author:
toby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallLinux

    v3 v4  
    55GSAS-II is normally distributed with binary files for Python and associated packages from the [https://www.anaconda.com/download/#linux Anaconda Python distribution]. If these files are not compatible with your version of Linux, you will need to obtain Python & required packages through some method, such packages distributed by your Python distribution channel. We also distribute compiled library (.so) files for the Fortran code used inside GSAS-II. These files need to be matched to the Python version and the numpy version, but sometimes will need to be compiled in the Linux environment where they will be used, despite this.
    66
    7 == Installing the easy way ==
     7== I. Installing the easy way ==
    88
    99If you are lucky, you can install GSAS-II by downloading a single file that contains all needed Python packages and then automatically downloads the appropriate files from the GSAS-II svn server. See [wiki:LinuxSingleStepInstaller these instructions] for more details.
    1010
    11 == Installing for Anaconda Enthusiasts ==
     11== II. Installing for Anaconda Enthusiasts ==
    1212
    13 If you are already a user of Anaconda Python, then you may not want to install yet another version of Python on your computer. If so, you can use the conda package manager in Anaconda to install GSAS-II for you with a simple command:
     13If you are already a user of Anaconda Python, then you may not want to install yet another version of Python on your computer. If so, you can use the conda package manager in Anaconda to install GSAS-II for you with a simple terminal window command:
    1414
    1515{{{
     
    1919See [wiki:InstallConda here for more information] on this.
    2020
    21 == Installing Python Manually ==
     21== III. Installing Python Manually ==
    2222
    23 GSAS-II will run with any distribution of Python provided it is version 2.7.x or >=3.6 and provided you have the required packages, which include wxPython, !NumPy, !SciPy, matplotlib and PyOpenGL; some other packages are required for optional functionality; see [https://gsas-ii.readthedocs.io/en/latest/#required-packages here for more information on package requirements in GSAS-II.] Provided you can satisfy these requirements, then Python dists from Redhat, Debian, Ubuntu,... will work fine. Likewise, alternate Python distributions from [https://python-xy.github.io/ Python(x,y)], [https://www.enthought.com/product/canopy/ Enthought Canopy] and [https://www.activestate.com/activepython ActiveState ActivePython] should work fine, but none have been tested in many years.
     23GSAS-II will run with any distribution of Python provided it is version 2.7.x or >=3.6 and provided you have the required packages, which include wxPython, !NumPy, !SciPy, matplotlib and PyOpenGL; some other packages are required for optional functionality; see [https://gsas-ii.readthedocs.io/en/latest/#required-packages here for more information on package requirements in GSAS-II.] Provided you can satisfy these requirements, then Python dists from Redhat, Debian, Ubuntu,... will work fine. (For some notes on package installation with older versions of Linux, see [wiki:"InstallLinux-prev"].) Likewise, alternate Python distributions from [https://python-xy.github.io/ Python(x,y)], [https://www.enthought.com/product/canopy/ Enthought Canopy] and [https://www.activestate.com/activepython ActiveState ActivePython] should work fine, but none have been tested in many years.
    2424
    25 You will also need subversion (svn) to download GSAS-II files.
     25You will also need subversion (svn) to download GSAS-II files. All Linux dists offer this (also in Anaconda).
    2626
    2727Once you have installed Python, follow these steps to install GSAS-II:
    2828
    29 1. Create an empty directory. Best to have no spaces in the full path. GSASII is a good name for this, but this is optional.
     291. Create an empty directory. Best to have no spaces in the full path. GSASII is a good name for this, but this is optional. This location will be used as `<path>` in the instructions below.
    3030
    31 3. Download the  installation script (bootstrap.py)
     312. Download the  installation script (bootstrap.py) from https://subversion.xray.aps.anl.gov/pyGSAS/install/. Two ways to do this are
     32   a. with commands:
     33{{{
     34cd <path>
     35svn export https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py .
     36}}}
     37   b. by loading this URL in a browser: https://subversion.xray.aps.anl.gov/trac/pyGSAS/browser/install/bootstrap.py?format=txt and then move this file to `<path>`.
    3238
    33 See [wiki:"InstallLinux-prev"].
    34 See [wiki:"InstallLinux-prev"].
     393. Run the bootstrap.py script using the python package you have installed with this command in a terminal window
     40
     41{{{
     42<pypath>python bootstrap.py
     43}}}
     44        Where <pypath> is the location where python has been installed (may be omitted if this Python is in your path).
     45
     46    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 `<pypath>python <path>GSASII.py`
     47
     48    If you are installing GSAS-II on a server and want to download binary files for all supported platforms, use
     49{{{
     50<pypath>python bootstrap.py -server
     51}}}
     52    or equivalently
     53{{{
     54<pypath>python bootstrap.py -allbinaries
     55}}}
     56
     57== Compiling Fortran Code ==
     58
     59Most users will not need to do this, but if you get an error message such as:
     60{{{
     61Failed to run pyspg in .../GSASII/bindist
     62error: libgfortran.so.3: cannot open shared object file: No such file or directory
     63}}}
     64or an error message about a missing symbol... In this case, you have a choice. You can try to modify your Linux installation to have appropriate libraries (which may be older compatibility versions or updates) or compile the GSAS-II files locally. To do the latter you will need to have the Python scons file and the Linux gfortran compiler installed.
     65
     66If you are using Anaconda Python (see I. and II. above), this can be done with a simple command:
     67{{{
     68conda install scons gfortran_linux-64
     69}}}
     70If conda is not in your path, then fix that with this command before running the above:
     71{{{
     72source <pypath>/bin/activate
     73}}}
     74
     75Otherwise, you will need to use your Linux package manager to install gfortran and scons. You will also need the !NumPy f2py routine, but that should already be present since you already installed !NumPy. In a terminal window use the following commands
     76
     771. change the working directory:
     78{{{
     79cd <path>/GSASII/fsource and
     80}}}
     81
     822. run scons to start compilation
     83{{{
     84scons
     85}}}
     86
     87If 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.
     88
     89== Problems ==
     90
     91Most GSAS-II testing is done with Windows and Macs (sorry), but we do some testing of GSAS-II on Linux
     92and it does work as far as we are aware. Please do report problems, since we can't fix what we don't know about ([https://subversion.xray.aps.anl.gov/trac/pyGSAS#Bugs see here]), but cannot promise to test with a specific Linux dist.