1 | Required Packages & Supported Platforms |
---|
2 | ========================================== |
---|
3 | |
---|
4 | GSAS-II requires a standard Python interpreter to be installed, as |
---|
5 | well as several separately-developed packages. GSAS-II is being |
---|
6 | developed using Python 3.7 and 3.9. At this point we think that |
---|
7 | most sections of the code have been exercised in Python 3, |
---|
8 | but bugs are still expected (please report them). We are no longer |
---|
9 | testing with Python 2.7 and strongly urge everyone to upgrade, |
---|
10 | but if problems running GSAS-II in Python 2.7 are reported, we will |
---|
11 | consider making that the code compliant with both. |
---|
12 | |
---|
13 | Note that the packages listed below are not distributed as part of the Python standard |
---|
14 | library. We have been depending on the free Anaconda |
---|
15 | Python (https://www.anaconda.com/) |
---|
16 | distribution (and provide installers based on that), but Anaconda does |
---|
17 | not seem to be supplying up to date versions of the wxpython package |
---|
18 | that the GUI requires and does not have versions for all supported |
---|
19 | platforms. Use of the miniforge |
---|
20 | (https://github.com/conda-forge/miniforge) distribution is recommended |
---|
21 | where needed. |
---|
22 | |
---|
23 | There are many other Python distributions, such as Enthought Inc.'s Canopy and |
---|
24 | Python(x,y), see here: |
---|
25 | https://www.python.org/download/alternatives/. We are no longer using |
---|
26 | any of them and are unsure of how they will function. Some very old |
---|
27 | GSAS-II installations were based on the quite outdated Enthought Python Distribution |
---|
28 | (EPD); this is known to have some problems with reading CIFs and we |
---|
29 | strongly encourage updating from that. |
---|
30 | |
---|
31 | More details on allowed and prefered package versions can be found in |
---|
32 | the documentation for variable :attr:`GSASIIdataGUI.versionDict`. |
---|
33 | |
---|
34 | GUI Requirements |
---|
35 | ---------------- |
---|
36 | |
---|
37 | When using the GSAS-II graphical user interface (GUI), the following |
---|
38 | Python extension packages are required: |
---|
39 | |
---|
40 | * wxPython (http://wxpython.org/docs/api/). Note that GSAS-II has been tested with wxPython 2.8.x, 3.0.x and 4.0.x. We encourage use of 3.0 with Python 2.7 and 4.x with Python 3.x. |
---|
41 | * NumPy (http://docs.scipy.org/doc/numpy/reference/), |
---|
42 | * SciPy (http://docs.scipy.org/doc/scipy/reference/), |
---|
43 | * matplotlib (http://matplotlib.org/contents.html) and |
---|
44 | * PyOpenGL (http://pyopengl.sourceforge.net/documentation). Note: a copy of this is distributed with GSAS-II (at present) and will be installed if the Python setuptools package is present. |
---|
45 | |
---|
46 | Several packages are used in sections of the code, but are not |
---|
47 | required. If these packages are not present, warning messages may be |
---|
48 | generated if they would be needed, but the vast bulk of GSAS-II will function normally. |
---|
49 | |
---|
50 | * Pillow (https://pillow.readthedocs.org) or PIL (http://www.pythonware.com/products/pil/). This is used to save |
---|
51 | and read certain types of images. |
---|
52 | * h5py is the HDF5 interface and hdf5 is the support package. These |
---|
53 | packages are (not surprisingly) required |
---|
54 | to import images from HDF5 files. If these libraries are not present, |
---|
55 | the HDF5 importer(s) will not appear in the import menu and a |
---|
56 | warning message appears on GSAS-II startup. |
---|
57 | * imageio is used to make movies. |
---|
58 | * svn: When using Anaconda we also encourage installation of the |
---|
59 | svn (subversion) conda package. This is not actually part of Python |
---|
60 | and can be installed directly into your system's configuration. It is used by |
---|
61 | GSAS-II to download updates to our code. This can be skipped if svn |
---|
62 | is installed directly (easy Linux, but a bit harder on MacOS and |
---|
63 | Windows). |
---|
64 | * conda: the conda package allows access to conda features from |
---|
65 | inside Python. It will be used inceasingly by GSAS-II to |
---|
66 | self-install software. The conda package is installed by default in |
---|
67 | miniconda and anaconda but if you create an environment for GSAS-II |
---|
68 | (`conda create -n <env> package-list...`), it will not be added |
---|
69 | unless you request it specifically. |
---|
70 | |
---|
71 | *Conda command*: |
---|
72 | Here is a typical conda command used to install a GSAS-II compatible |
---|
73 | Python interpreter:: |
---|
74 | |
---|
75 | conda install wxpython numpy scipy matplotlib pyopengl pillow h5py imageio svn -c conda-forge |
---|
76 | |
---|
77 | or to use a separate environment (here named ``g2python``), use:: |
---|
78 | |
---|
79 | conda install -n g2python wxpython numpy scipy matplotlib pyopengl pillow h5py imageio svn conda -c conda-forge |
---|
80 | |
---|
81 | Remember to activate using: ``<path>\Scripts\activate`` (windows); |
---|
82 | ``source <path>/bin/activate`` (Mac/Linux). Note that one should add |
---|
83 | ``g2python`` (etc.) at the end if using a conda environment. |
---|
84 | |
---|
85 | Note that svn seems to be unsupported these days by Anaconda. For |
---|
86 | Linux and MacOS, use subversion in conda-forge rather than svn. No |
---|
87 | good solution yet for Windows. |
---|
88 | |
---|
89 | Scripting Requirements |
---|
90 | ----------------------- |
---|
91 | |
---|
92 | When using the GSAS-II scripting interface (:mod:`GSASIIscriptable`), |
---|
93 | only the following Python extension packages are required: |
---|
94 | |
---|
95 | * NumPy (http://docs.scipy.org/doc/numpy/reference/), |
---|
96 | * SciPy (http://docs.scipy.org/doc/scipy/reference/). |
---|
97 | |
---|
98 | Note that a few sections of the code require matplotlib (http://matplotlib.org/contents.html), Pillow |
---|
99 | (https://pillow.readthedocs.org) (or PIL, |
---|
100 | http://www.pythonware.com/products/pil/), or h5py + hdf5, but none of |
---|
101 | these are required to run scripts and the vast |
---|
102 | majority of scripts will not need these packages. |
---|
103 | |
---|
104 | Optional Packages |
---|
105 | ----------------------- |
---|
106 | |
---|
107 | * Sphinx (https://www.sphinx-doc.org) is used to generate the |
---|
108 | documentation you are currently reading. Generation of documentation |
---|
109 | is not generally something needed by users or even most code developers. |
---|
110 | |
---|
111 | * SCons (https://scons.org/) is used to compile the small amount of |
---|
112 | Fortran code that is included with GSAS-II. Use of this is |
---|
113 | discussed in the last section of this chapter. |
---|
114 | |
---|
115 | |
---|
116 | External and Supplied Programs |
---|
117 | -------------------------------- |
---|
118 | |
---|
119 | GSAS-II provides interfaces to use a number of programs developed by |
---|
120 | others. Some are included with GSAS-II and others must be installed |
---|
121 | separately. When these programs are accessed, citation |
---|
122 | information is provided. |
---|
123 | |
---|
124 | GSAS-II includes copies of these programs: |
---|
125 | |
---|
126 | **DIFFaX** |
---|
127 | Simulate layered structures with faulting |
---|
128 | |
---|
129 | **CifFile** |
---|
130 | A software library used to read data and structures from CIF |
---|
131 | |
---|
132 | **Shapes** |
---|
133 | Model small angle scattering with shaped particles |
---|
134 | |
---|
135 | **NIST FPA** |
---|
136 | Use Fundamental Parameters to determine GSAS-II profile function |
---|
137 | |
---|
138 | No additional steps beyond a standard installation |
---|
139 | are needed to access their functionality. |
---|
140 | |
---|
141 | **Bilboa Crystallographic Server**: GSAS-II directly access the |
---|
142 | Bilboa Crystallographic Server (provided |
---|
143 | the computer has internet access). This allows automated use of the |
---|
144 | k-SUBGROUPSMAG, k-SUBGROUPS and PseudoLattice web utilities for |
---|
145 | computation of space group subgroups, color (magnetic) subgroups & |
---|
146 | lattice search. |
---|
147 | |
---|
148 | At the request of the program authors, these programs are not included |
---|
149 | with GSAS-II and must be installed separately: |
---|
150 | |
---|
151 | **RMCProfile** |
---|
152 | Large-box PDF & S(Q) fitting. We have heard from users that V6.7.7 |
---|
153 | of RMCProfile is compatible with the input created by GSAS-II, |
---|
154 | but not V6.7.9. |
---|
155 | |
---|
156 | **fullrmc** |
---|
157 | A modern software toolkit for large-box PDF & S(Q) fitting. Use |
---|
158 | version 5.0 or later. The implementation for this is not |
---|
159 | completed. |
---|
160 | |
---|
161 | **Dysnomia** |
---|
162 | Computes enhanced Fourier maps with Maximum Entropy estimated |
---|
163 | extension of reflection sphere |
---|
164 | |
---|
165 | **PDFfit2** |
---|
166 | Small-box fitting of PDFs. This code is no longer supported, but is |
---|
167 | still quite useful. It can be installed from conda into Python |
---|
168 | versions up to Python 3.7, but is supplied for Windows within |
---|
169 | GSAS-II for Python 3.7, 3.8 and 3.9 and for MacOS only with Python |
---|
170 | 3.7. |
---|
171 | |
---|
172 | For other platforms/Python versions, it is probably best to use a |
---|
173 | separate Python interpreter. |
---|
174 | |
---|
175 | Supported Platforms |
---|
176 | -------------------------------- |
---|
177 | |
---|
178 | It should be possible to run GSAS-II on any computer where Python 3.7+ and |
---|
179 | the appropriate required packages are available. For many platforms, |
---|
180 | binary versions of the Fortran code used in GSAS-II are supplied, but the |
---|
181 | binaries must match the platform and the major versions of both Python and |
---|
182 | numpy; even for supported platforms; not all combinations are |
---|
183 | provided. Should one wish to run GSAS-II where binary files are not |
---|
184 | supplied, compilation will be needed. This will require the GNU Fortran (gfortran) |
---|
185 | compiler (https://gcc.gnu.org/fortran/) as well as the Python SCons |
---|
186 | package. Instructions are supplied for a number of platforms (such as |
---|
187 | https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/InstallLinux#CompilingFortranCode). Note |
---|
188 | that there are prepackaged versions of GSAS-II for most common |
---|
189 | platforms. These include Python, all required and most optional |
---|
190 | packages and a version of all files needed to run GSAS-II -- albeit |
---|
191 | not usually the current version. The |
---|
192 | installation process will try to update to the current version, if the |
---|
193 | computer where installation is occuring has internet access. |
---|
194 | |
---|
195 | At present the following platforms are directly supported: |
---|
196 | |
---|
197 | * **Windows-10**: Installation kits are available for both 32-bit and |
---|
198 | 64-bit windows. Running GSAS-II on older versions of Windows is |
---|
199 | likely possible, but to do so one must locate compatible versions of Python |
---|
200 | and packages. This is getting increasingly tough. We have not tried |
---|
201 | Windows-11, but expect the Windows-10 versions to run there. |
---|
202 | |
---|
203 | * **MacOS**: We provide an installer for Macs with Intel |
---|
204 | processors. This can also be used on ARM-equipped Macs ("M1" or "Apple |
---|
205 | Silicon" processors) but native M1 code runs way |
---|
206 | faster. Installation on the native ARM code is more complex; our |
---|
207 | instructions (https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/MacM1Notes) |
---|
208 | require that the homebrew package installer be installed and then |
---|
209 | brew (homebrew) be used to install Python and a number of packages. |
---|
210 | Macs older than |
---|
211 | Catalina (10.15) may require older distributions of Python. |
---|
212 | |
---|
213 | * **Linux** (Intel-compatible): GSAS-II does not get a lot of testing in Linux by us, but is |
---|
214 | fairly widely used on this platform nonetheless. One can use the |
---|
215 | installer that we provide, but compatibility with older and very new |
---|
216 | versions of OSes can be tough and may require compatibility |
---|
217 | libraries. At times it may be better to use the Linux distribution's |
---|
218 | versions of Python and packages. This is typically done with a |
---|
219 | software tool such as apt or yum. An example on how to do this is |
---|
220 | shown for the Raspberry Pi. |
---|
221 | |
---|
222 | * **Raspberry Pi** (ARM) Linux: GSAS-II has been installed on both 32-bit |
---|
223 | and the experimental 64-bit version of the Raspberry Pi OS (formerly |
---|
224 | called Raspbian) and compiled binaries are provided. It should also |
---|
225 | run with Ubuntu Linux for this platform, but this has not been |
---|
226 | tried. It is necessary to use the Raspbian Linux distribution's |
---|
227 | versions of Python and its packages. Instructions are provided |
---|
228 | (https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/InstallPiLinux). |
---|
229 | The performance of GSAS-II on a Raspberry Pi is not blindingly fast, |
---|
230 | but one can indeed run GSAS-II on a computer that costs only $15! |
---|
231 | |
---|