Changes between Version 9 and Version 10 of InstallLinux


Ignore:
Timestamp:
Sep 14, 2021 3:19:48 PM (5 weeks ago)
Author:
toby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallLinux

    v9 v10  
    33There are a number of ways to install GSAS-II on Linux machines. Alas, none work on all Linux dists, because there are so many different versions of libraries files in use and this means that any compiled files created on one Linux version will be incompatible with some others.
    44
    5 GSAS-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 despite this they will need to be compiled in the Linux environment where they will be used.
     5GSAS-II is normally distributed with binary (.so) files for the Fortran code used inside GSAS-II. These files are compiled on a Redhat Enterprise Linux system using Python and numPy from the [https://www.anaconda.com/download/#linux Anaconda Python distribution]. You may have compatibility issues with your local version of Linux, depending on what version of Python you have installed and what system libraries are available. See discussions on [#CompilingFortranCode Compiling Fortran Code] and [#Problems Problems], below. Note that the compiled files we distribute must be matched to both the Python version and the numpy version.
    66
    77== I. Installing the easy way ==
     
    2222}}}
    2323
    24 see [wiki:LinuxSingleStepInstaller these instructions] for more details. This is only available for 64 bit Linux dists.
     24see [wiki:LinuxSingleStepInstaller these instructions] for more details. This is only available for 64 bit Linux dists running on Intel-compatible processor.
    2525
    2626== II. Installing for Anaconda Enthusiasts ==
     
    4545== III. Installing Python etc. Manually ==
    4646
    47 GSAS-II will run with any distribution of Python, provided it is version >=3.6, and provided you have the GSAS-II 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.] As far as I am aware, wxPython is only supported on Intel-compatible CPUs, but if you can get Python and the above packages to run on a different CPU and can compile (see below) GSAS-II should run.
     47GSAS-II will run with any distribution of Python, provided it is version >=3.6, and provided you have the GSAS-II 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.] I can report that the ARM version of wxPython runs fine on the Mac, but have not tried this in Linux yet. In general, if you can get Python and the above packages to run on a different CPU type, and can compile ([#CompilingFortranCode see below]), GSAS-II should run.
    4848
    4949
    50 Provided you can satisfy the above 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.
     50Provided you can satisfy the above package 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.
    5151
    52 You will also need subversion (svn) to download GSAS-II files. All Linux dists offer this (also in Anaconda).
     52You will also need subversion (svn) to download GSAS-II files. All Linux dists offer this (also found in Anaconda).
    5353
    5454Once you have installed Python, follow these steps to install GSAS-II:
     
    118118
    119119Most GSAS-II testing is done with Windows and Macs (sorry), but we do some testing of GSAS-II on Linux
    120 and 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.
     120and 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 your specific Linux dist.
    121121
    122 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. How to do this is best determined with a Google search relevant you your Linux dist.
    123 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 bash 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 starts but does not complete, delete the previous installation directory before trying again.
     122There are many, many versions of Linux and some are too new or old and thus will not have .so libraries installed that allow running our supplied versions of Python or the compiled GSAS-II Fortran code.
    124123
     124You should be able to run GSAS-II with Python and packages from your Linux dist, though sometimes those package versions are so new that you will discover incompatibilities that we have not yet seen. To avoid that you can use the Anaconda Python installer, which is included in the {{{gsas2full-Latest-Linux-x86_64.sh}}} file referenced in [#I.Installingtheeasyway Step I] above.
     125
     126One problem we have seen with this comes from not running the installer 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 starts but does not complete, delete the previous installation directory before trying again.
     127
     128If you see an error message like this when starting GSAS-II:
     129{{{
     130Failed to run pyspg in /home/me/anaconda3/envs/G2/GSASII/bindist
     131error: libgfortran.so.4: cannot open shared object file: No such file or directory
     132}}}
     133then you may be able to address the problem by installing a
     134compatibility library (using a command like this: {{{yum install libgfortran4}}}). A Google search with the name of the missing library and the name of your distribution (CentOS, Ubuntu, Fedora,...) may help.
    125135== Rerunning bootstrap.py ==
    126136
     
    129139~/g2full/bin/python ~/g2full/GSASII/bootstrap.py
    130140}}}
    131 changing the prefix ```~/g2full/``` to reflect your choice for {{{<condapath>}}}.
     141changing the prefix `~/g2full/` to reflect your choice for {{{<condapath>}}}.
    132142
    133 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 [ProxyInfo web proxies].
     143Running the bootstrap.py file should update GSAS-II to the latest version and complete any remaining installation steps and will. 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 [ProxyInfo web proxies].
    134144
    135145