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. |
| 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. (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. |
33 | | See [wiki:"InstallLinux-prev"]. |
34 | | See [wiki:"InstallLinux-prev"]. |
| 39 | 3. 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 | |
| 59 | Most users will not need to do this, but if you get an error message such as: |
| 60 | {{{ |
| 61 | Failed to run pyspg in .../GSASII/bindist |
| 62 | error: libgfortran.so.3: cannot open shared object file: No such file or directory |
| 63 | }}} |
| 64 | or 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 | |
| 66 | If you are using Anaconda Python (see I. and II. above), this can be done with a simple command: |
| 67 | {{{ |
| 68 | conda install scons gfortran_linux-64 |
| 69 | }}} |
| 70 | If conda is not in your path, then fix that with this command before running the above: |
| 71 | {{{ |
| 72 | source <pypath>/bin/activate |
| 73 | }}} |
| 74 | |
| 75 | Otherwise, 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 | |
| 77 | 1. change the working directory: |
| 78 | {{{ |
| 79 | cd <path>/GSASII/fsource and |
| 80 | }}} |
| 81 | |
| 82 | 2. run scons to start compilation |
| 83 | {{{ |
| 84 | scons |
| 85 | }}} |
| 86 | |
| 87 | 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. |
| 88 | |
| 89 | == Problems == |
| 90 | |
| 91 | Most GSAS-II testing is done with Windows and Macs (sorry), but we do some testing of GSAS-II on Linux |
| 92 | 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. |