You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: webdocs/install.rst
+87-53Lines changed: 87 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,15 @@ For Windows download file https://github.com/AdvancedPhotonSource/GSAS-II-buildt
25
25
After the installer is started
26
26
You will have a choice for where to install the software (the default is usually OK, but something like ``c:\software`` might be better, if your computer security allows that.)
27
27
28
-
More complete installation instructions `are here <install-g2f-win.html>`_.
28
+
More complete installation instructions on the GSAS2MAIN
29
+
installation process on windows are linked below.
30
+
31
+
.. index:: gsas2main windows details
32
+
.. toctree::
33
+
:maxdepth:1
34
+
35
+
install-g2f-win.rst
36
+
29
37
30
38
MacOS
31
39
--------------------
@@ -47,7 +55,14 @@ where:
47
55
48
56
<install-loc> is where you want to install the software. (Use of ``~/g2main``, a subdirectory named ``g2main`` in your home directory is a good choice.) After installation is complete, you will be given a chance to place a shortcut for GSAS-II into the MacOS dock.
49
57
50
-
More complete installation instructions are provided for `MacOS separately <install-g2f-mac.html>`_.
58
+
More complete installation instructions on the GSAS2MAIN
59
+
installation process on MacOS are linked below.
60
+
61
+
.. index:: gsas2main MacOS details
62
+
.. toctree::
63
+
:maxdepth:3
64
+
65
+
install-g2f-mac.rst
51
66
52
67
Linux
53
68
--------------------
@@ -63,6 +78,19 @@ former is built on an APS Redhat Enterprise server, while the latter
63
78
is built on an Ubuntu GitHub runner (24.04.2 LTS, last I
64
79
checked). Neither may be compatible with other Linux versions.
65
80
81
+
Binary compatibility between Linux systems is not all that
82
+
good. If the above do not work, or if you prefer to use code packages
83
+
distributed for your Linux platform, you are encouraged to use
and then use the ``gitcompile.py`` routine, discussed in the
91
-
:ref:`gitcompile` section below to download, compile and install GSAS-II.
92
-
Another easy-to-use option is to use pixi, (see :ref:`pixi
93
-
installation`). The disadvantage of pixi is that you will need to
94
-
update GSAS-II manually with git commands and then rerun pixi.
95
-
96
-
GSAS2MAIN Additional Details
97
-
----------------------------------------
98
-
99
-
The pages listed below go through the GSAS2MAIN installation process on each identified platform in much greater detail.
111
+
More complete installation instructions on the GSAS2MAIN
112
+
installation process on linux are below.
100
113
101
-
.. index:: gsas2pkg installer
114
+
.. index:: gsas2main MacOS details
102
115
.. toctree::
103
116
:maxdepth:3
104
117
105
-
install-g2f-win.rst
106
-
install-g2f-mac.rst
107
118
install-g2f-linux.rst
108
-
109
-
110
-
GSAS2PKG Conda Package
111
-
=======================
112
119
113
-
Users who work extensively with Python and use the conda Python installer may prefer to utilize their existing conda installation to obtain GSAS-II along with the Python configuration that GSAS-II prefers. This can be done with this command (on all platforms)::
This creates a conda virtual environment named ``GSASII`` (this can be changed) for use by GSAS-II. While it is also possible to install GSAS-II into the conda base environment, this is not recommended as it can create conflicts between Python and package versions needed by GSAS-II and those required by other packages. (If you choose to do this anyway, be sure to specify ``conda install python=3.13 briantoby::gsas2pkg`` as Python is likely to be pinned to a different version.)
118
-
119
-
After this command is run, use command ``conda activate GSASII`` to access the
120
-
conda environment that has been created. On Linux and MacOS computers, two shortcut commands will then be available in the path, The first command, ``gsasII.sh``, which will start GSAS-II. This can optionally be used as ``gsasII.sh project.gpx`` to open existing project file ``project.gpx`` in GSAS-II. The second command, ``reset-gsasII.sh`` will rarely be used. This command will download the latest version of GSAS-II and update to that version, replacing any locally modified files with the original versions. This can be used to update GSAS-II when the program will not start, so the normal Help->Update menu command cannot be accessed. (Shortcuts available with gsas2pkg v5.1+.)
@@ -238,11 +249,35 @@ start due to changes that have been made locally, the ``--reset``
238
249
option might be needed.
239
250
240
251
.. index:: Installing GSAS-II from GitHub
252
+
253
+
254
+
GSAS2PKG Conda Package
255
+
=======================
256
+
257
+
Users who work extensively with Python and use the conda Python installer may prefer to utilize their existing conda installation to obtain GSAS-II along with the Python configuration that GSAS-II prefers. This can be done with this command (on all platforms)::
This creates a conda virtual environment named ``GSASII`` (this can be changed) for use by GSAS-II. While it is also possible to install GSAS-II into the conda base environment, this is not recommended as it can create conflicts between Python and package versions needed by GSAS-II and those required by other packages. (If you choose to do this anyway, be sure to specify ``conda install python=3.13 briantoby::gsas2pkg`` as Python is likely to be pinned to a different version.)
262
+
263
+
After this command is run, use command ``conda activate GSASII`` to access the
264
+
conda environment that has been created. On Linux and MacOS computers, two shortcut commands will then be available in the path, The first command, ``gsasII.sh``, which will start GSAS-II. This can optionally be used as ``gsasII.sh project.gpx`` to open existing project file ``project.gpx`` in GSAS-II. The second command, ``reset-gsasII.sh`` will rarely be used. This command will download the latest version of GSAS-II and update to that version, replacing any locally modified files with the original versions. This can be used to update GSAS-II when the program will not start, so the normal Help->Update menu command cannot be accessed. (Shortcuts available with gsas2pkg v5.1+.)
265
+
266
+
Note that on MacOS, a Mac app is also created and is displayed in the Finder
267
+
`see steps 5 & 6 here <install.html#macos-gsas2main-installation-details>`_. This app can be used to start GSAS-II from the dock or desktop.
268
+
269
+
.. index:: Installing GSAS-II with gitstrap.py
270
+
241
271
242
272
Installation Info for Developers
243
273
==============================================
244
274
245
-
While all of the above approaches will clone a copy of the GSAS-II repository from GitHub, software developers may find it more convenient to clone the repo themselves. This will typically be done as part of a process where a copy of GSAS-II is forked on GitHub. This is described in a `separate page <install_dev.html>`_ (outline below).
275
+
While all of the above approaches will clone a copy of the GSAS-II
276
+
repository from GitHub, software developers may find it more
277
+
convenient to clone the repo themselves. This will typically be done
278
+
as part of a process where a copy of GSAS-II is forked on GitHub. This
279
+
is described in a `separate page <install_dev.html>`_ (outline
280
+
below).
246
281
247
282
.. index:: Installing for development
248
283
.. toctree::
@@ -251,20 +286,6 @@ While all of the above approaches will clone a copy of the GSAS-II repository fr
251
286
install_dev.rst
252
287
253
288
254
-
Older Installers
255
-
=================================
256
-
257
-
Previously GSAS-II was provided via an Advanced Photon Source-maintained subversion (svn) server, with differing installation processes. The subversion server is not longer being updated, so those installers should not be used because if GSAS-II is installed from subversion, you will not be able to update to the current GSAS-II version.
258
-
If you previously installed GSAS-II from that server, you will be
259
-
shown a message when trying to update that you should reinstall
260
-
GSAS-II as described above.
261
-
262
-
Likewise, the gsas2full installer was used to install GSAS-II from the
263
-
older ``master`` branch. Use of this installer is discouraged. If you
264
-
install GSAS-II from that branch, you will be
265
-
be offered the opportunity to add needed Python packages and switch to
266
-
the ``main`` branch when trying to update GSAS-II from the help menu.
267
-
268
289
Installation Details
269
290
====================================
270
291
@@ -280,3 +301,16 @@ if the distributed binaries cannot be used.
280
301
install-pip.rst
281
302
proxy.rst
282
303
304
+
Older Installers
305
+
=================================
306
+
307
+
Previously GSAS-II was provided via an Advanced Photon Source-maintained subversion (svn) server, with differing installation processes. The subversion server is not longer being updated, so those installers should not be used because if GSAS-II is installed from subversion, you will not be able to update to the current GSAS-II version.
308
+
If you previously installed GSAS-II from that server, you will be
309
+
shown a message when trying to update that you should reinstall
310
+
GSAS-II as described above.
311
+
312
+
Likewise, the gsas2full installer was used to install GSAS-II from the
313
+
older ``master`` branch. Use of this installer is discouraged. If you
314
+
install GSAS-II from that branch, you will be
315
+
be offered the opportunity to add needed Python packages and switch to
316
+
the ``main`` branch when trying to update GSAS-II from the help menu.
Copy file name to clipboardExpand all lines: webdocs/install_dev.rst
-77Lines changed: 0 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,80 +128,3 @@ You are strongly encouraged to create a separate branch for each development pro
128
128
129
129
When your changes are complete and you are ready to communicate them back, you will commit them locally and use ``git push`` to upload them to GitHub. From the web interface to GitHub you can then submit that branch as a pull request to the main GSAS-II repository. Once you have submiited your pull request, you likely will want to switch to a different branch to do any further development work, as if changes are uploaded for the branch used for the pull request, those changes will be added to the code in the pull request.
130
130
131
-
.. index:: Installing with pixi
132
-
133
-
.. _pixi installation:
134
-
135
-
==============================================
136
-
Using Pixi to install GSAS-II
137
-
==============================================
138
-
139
-
The code in the ``main`` includes setup files for `Pixi <https://pixi.sh>`_, which is a package management tool for developers. If one uses Git to install the GSAS-II files and installs the Pixi software, GSAS-II can be configured and installed very simply.
140
-
It is particularly convenient for GSAS-II software development.
141
-
There are many ways to install Pixi, as listed `here <https://pixi.sh>`_, or by using the ``conda install pixi`` command, or homebrew, etc.
142
-
143
-
Once pixi is installed, it can be used to setup and run GSAS-II, with commands as described below. These commands download GSAS-II from GitHub, install it, including compiling the files locally, then runs the self-tests and then finally starts the GSAS-II GUI::
The pixi program makes all this very easy. Developers will likely want to clone from their own fork of the repo (see above) and may want to use variants on these commands, such as add `--no-single-branch` so that all branches are available and/or change the `--depth` value or even omit that option. (Any of these increase the download time significantly.)
153
-
Also note the `install-editable` or `install-editable-win` options below. This allows that git-installed code is used to run GSAS-II rather than copies. With this "`editable" option you can make changes to GSAS-II and then restart it and see the impact of your changes immediately [with a bit of tampering, sometimes one can use `importlib.reload()` and see changes as soon as they are saved]. If the normal install process is used, the changes will be seen only after repeating the `pixi run install` step.
By default, the commands above will install and run GSAS-II with Python 3.13 (at the time this is written), but pixi can also setup GSAS-II to run with alternate Python versions. Available options are ``py310``, ``py311``, and ``py312``. To use an alternate environment, it should be added to every command, such as
0 commit comments