Changes between Version 1 and Version 2 of InstallLinux-prev


Ignore:
Timestamp:
Jul 25, 2012 1:10:17 PM (9 years ago)
Author:
toby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallLinux-prev

    v1 v2  
    11= Installing GSAS-II on Linux systems =
    22
    3 To date we have done a bit of testing with Linux, but we are not at the point where we can give a lot of advice on installation. (Contributions to this page are welcome).
     3To date we have done a bit of testing with Linux, but there are a lot of different Linux releases out there and we don't have a lot of experience yet. (Contributions to this page are welcome).
    44
    5 You must have two software packages installed: python and subversion. The later is easy with the package managers on all common Linux dists, but python may be another matter. There are a number of [PythonPackages Python packages required by GSAS-II] it is not clear how many of these packages are distributed for each Linux distribution. We are using another alternative, the [http://www.enthought.com/products/epd.php Enthought Python Distribution (EPD)]. Alternative to this include [http://www.enthought.com/products/epd_free.php Free Enthought Python Distribution (EPDFree)] (which will require installation of PyOpenGL), or [http://www.pythonxy.com/ Python(x,y)] or [http://www.activestate.com/activepython ActiveState ActivePython]. We simply have not tried any of these options.
     5== Overview ==
     6
     7Before 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 [PythonPackages 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 are recommending the [http://www.enthought.com/products/epd_free.php Free Enthought Python Distribution (EPD Free)], but we develop ourselves using the commercially supported version, the [http://www.enthought.com/products/epd.php Enthought Python Distribution (EPD)]. Alternative to this include [http://www.pythonxy.com/ Python(x,y)] or [http://www.activestate.com/activepython ActiveState ActivePython]. We simply have not tried the latter two.
     8
     9== Simplified Installation ==
     10
     11 1. Install subversion
     12
     13 2. Install Python and [PythonPackages required packages]
     14
     15 3. Create a directory where GSAS-II will be installed
     16
     17 4. Download the installation script (```bootstrap.py```) by using this URL:
     18
     19        https://subversion.xor.aps.anl.gov/trac/pyGSAS/browser/install/bootstrap.py?format=txt
     20
     21            or by using this command:
     22
     23        ```curl https://subversion.xor.aps.anl.gov/pyGSAS/install/bootstrap.py > bootstrap.py```
     24
     25 5. Move the ```bootstrap.py``` file into the directory where GSAS-II will be installed
     26
     27 6. Run the bootstrap.py script using the python package you have installed with command
     28
     29        ```<path1>python <path2>bootstrap.py```
     30
     31   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
     32
     337. 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.
    634
    735=== Compiling Fortran Code ===
    836
    9 GSAS-II requires a small number of Fortran routines that are incorporated as Python packages (.so files). GSAS-II is distributed with these files compiled for a number of python versions, but if you are using something that does not match what we distribute, you may need to compile the Fortran routines yourself using the !NumPy f2py routine and the compiler of your choice. Both G77 (32-bit Python only) and GFortran have been successful on the platforms we have tried.
     37`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:
    1038
    11 To help with compiling the programs, use the python scons routine 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 .pyd files. This is done by
     39GSAS-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, use the python scons routine 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
    1240 (1) opening a terminal window,
    1341
    14  (2) use the {{{cd}}} command to set your working directory to {{{...\GSASII\fsource}}} and
     42 (2) use the {{{cd}}} command to set your working directory to {{{<path2>/GSASII/fsource}}} and
    1543
    1644 (3) simply typing "{{{scons}}}" in the window.
    1745
    1846If 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. 
     47
     48== Ubuntu Install ==
     49
     50from Dr. Thomas Malcherek (July 25, 2012)
     51
     52Getting 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:
     53 python-scipy
     54
     55 python-wxgtk2.8
     56
     57 python-wxtools
     58
     59 wx2.8-i18n
     60
     61 python-opengl
     62
     63 scons
     64
     65The latest WX packages can be obtained from apt.wxwidgets.org after adding their repository to /etc/apt/sources.list
     66
     67After compiling the fortran modules using that scons command, I was able to start the program using
     68 ```python GSASII.py```