Require pybind 2.6 from environment for gmxapi Python package extension module.
[alexxy/gromacs.git] / docs / gmxapi / userguide / install.rst
1 ==============================
2 Full installation instructions
3 ==============================
4
5 .. highlight:: bash
6
7 Installation instructions for the :py:mod:`gmxapi` Python package,
8 built on GROMACS.
9
10 Command line examples assume the `bash <https://www.gnu.org/software/bash/>`_ shell.
11
12 .. note:: Regarding multiple GROMACS installations:
13     Many GROMACS users switch between multiple GROMACS installations on the same
14     computer using an HPC module system and/or a :ref:`GMXRC <getting access to |Gromacs|>` configuration script.
15     For the equivalent sort of environment switching with the :py:mod:`gmxapi` Python package,
16     we recommend installing it in a different
17     `Python virtual environment <https://www.google.com/search?q=python+virtual+environment>`_
18     for each GROMACS installation.
19     Once built, a particular copy of the :py:mod:`gmxapi` Python package always refers to the
20     same GROMACS installation.
21
22 .. contents:: Contents
23     :local:
24     :depth: 2
25
26 .. note::
27
28     The following documentation contains frequent references to the pip_ tool
29     for installing Python packages. In some cases, an unprivileged user should
30     use the ``--user`` command line flag to tell pip_ to install packages
31     into the user site-packages directory rather than the default site-packages
32     directory for the Python installation. This flag is not appropriate when
33     running :command:`pip` in a virtual environment (as recommended) and is omitted in
34     this documentation. If you need the ``--user`` flag, you should modify the
35     example commands to look something like :command:`pip install --upgrade somepackage --user`
36
37 .. note::
38
39     These instructions use the executable names :command:`python` and :command:`pip`
40     instead of :command:`python3` or :command:`pip3`. Some Python installations require the ``3``
41     suffix, but it is usually not necessary if you have already activated a Python
42     virtual environment (recommended).
43
44 Overview
45 ========
46
47 Typically, setting up the *gmxapi* Python package follows these three steps.
48 If this overview is sufficient for your computing environment,
49 you may disregard the rest of this document.
50
51 Install GROMACS
52 ---------------
53
54 Locate your GROMACS installation, or build and install GROMACS 2020 or higher.
55
56 .. seealso:: `GROMACS installation <http://manual.gromacs.org/documentation/current/install-guide/index.html>`_
57
58 The following assumes GROMACS is installed to :file:`/path/to/gromacs`
59
60 Set up a Python virtual environment
61 -----------------------------------
62
63 ::
64
65     python3 -m venv $HOME/myvenv
66     . $HOME/myvenv/bin/activate
67     python -m ensurepip --default-pip
68     pip install --upgrade pip setuptools wheel
69
70 .. seealso:: :ref:`gmxapi venv`
71
72 Install the gmxapi Python package
73 ---------------------------------
74
75 ::
76
77     . /path/to/gromacs/bin/GMXRC
78     pip install gmxapi
79
80 .. seealso:: :ref:`installation`
81
82 Background
83 ==========
84
85 *gmxapi* comes in three parts:
86
87 * GROMACS gmxapi library for C++.
88 * This Python package, supporting Python 3.7 and higher
89 * MD restraint plugins and sample gmxapi client code
90
91 GROMACS requirements
92 --------------------
93
94 The Python package requires a GROMACS installation.
95 Locate an existing GROMACS installation, or
96 `build and install GROMACS <http://manual.gromacs.org/documentation/current/install-guide/index.html>`_
97 before proceeding.
98
99 .. note::
100
101     Note that gmxapi requires that GROMACS is configured with ``GMXAPI=ON`` and ``BUILD_SHARED_LIBS=ON``.
102     These are enabled by default in most cases. If these options were overridden
103     for your GROMACS installation, you will see CMake errors when trying to build
104     and install the gmxapi Python package or other client software.
105
106 Then, "source" the :file:`GMXRC` file from the GROMACS installation
107 :ref:`as you normally would <getting access to |Gromacs|>`
108 before using GROMACS, or note its installation location so that you can pass it
109 to the build configuration.
110
111 Build system requirements
112 -------------------------
113
114 gmxapi can be built for Python 3.7 and higher.
115
116 You will need a C++ 17 compatible compiler and a reasonably up-to-date version
117 of CMake.
118 Full gmxapi functionality may also require an MPI compiler (e.g. :command:`mpicc`).
119
120 Important: To build a module that can be imported by Python, you need a Python
121 installation that includes the Python headers. Unfortunately, it is not always
122 obvious whether these headers are present or where to find them. The simplest
123 answer is to just try to build the Python package using these instructions, and
124 if gmxapi is unable to find the Python tools it needs, try a different Python
125 installation or install the additional development packages.
126
127 On a Linux system, this may require installing packages such as ``python-dev``
128 and/or ``python3-dev``.
129 If you are building Python, either from scratch or with a tool like
130 :command:`pyenv install` (see
131 `wiki entry <https://github.com/pyenv/pyenv/wiki#how-to-build-cpython-with---enable-shared>`_
132 ),
133 be sure to enable installation of the Python C library with the
134 ``--enable-shared`` flag.
135 Alternatively, various Python distributions provide a
136 sufficient build environment while only requiring installation into a user
137 home directory. (Some examples below.)
138
139 If you are using an HPC system with software available through modules you may
140 be able to just :command:`module load` a different Python installation and find one
141 that works.
142
143 Python environment requirements
144 -------------------------------
145
146 gmxapi requires Python 3.7 or higher. Check your version with
147 :command:`python3 --version` or :command:`python --version`.
148
149 ..  note::
150
151     The following documentation assumes you do not need to use a trailing '3' to
152     access a Python 3 interpreter on your system.
153     The default Python interpreter on your system may use :command:`python3` and :command:`pip3`
154     instead of :command:`python` and :command:`pip`. You can check the version with
155     :command:`python3 --version` or :command:`python --version` and :command:`pip --version`.
156
157 To build and install, you need the Python packages for
158 cmake_, networkx_, and setuptools_
159 (all available from `PyPI with pip <https://pip.pypa.io/en/stable/>`_).
160
161 For full functionality, you should also have mpi4py_ and numpy_.
162 These requirements and version numbers are listed in :file:`requirements.txt`.
163
164 The easiest way to make sure you have the requirements installed, first update
165 pip_, then use the :file:`requirements.txt` file provided with the repository.
166 File paths in this section are relative to the root directory of your local copy
167 of the GROMACS source.
168
169 Confirm that pip_ is available, install pip_ if it is missing, or get
170 instructions on how to install pip_::
171
172     python -m ensurepip --default-pip
173
174 Install or upgrade required components::
175
176     python -m pip install --upgrade pip
177     pip install --upgrade setuptools
178
179 "requirements" files in GROMACS source tree
180 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
181
182 If you are building from source code in a local copy of the GROMACS source
183 repository, some helpful files allow you to preinstall the Python requirements
184 before installing the :py:mod:`gmxapi` package.
185
186     pip install -r python_packaging/src/requirements.txt
187
188 If building documentation or running tests,
189 :command:`pip install -r python_packaging/requirements-docs.txt` or
190 :command:`pip install -r python_packaging/requirements-test.txt`,
191 respectively, or see below.
192
193 Documentation build requirements
194 --------------------------------
195
196 See :ref:`gmxapi_package_documentation`
197
198 .. _testing requirements:
199
200 Testing requirements
201 --------------------
202
203 Note that the test suite is only available in the GROMACS source tree.
204 (It is not part of the installed package.)
205 Acquire the GROMACS sources with :command:`git` or by downloading an archive, as documented elsewhere.
206
207 Testing is performed with `pytest <https://docs.pytest.org/en/latest/>`_.
208
209 :file:`python_packaging/requirements-test.txt` lists additional requirements for testing.
210 With pip_::
211
212     pip install -r python_packaging/requirements-test.txt
213
214 To test the full functionality also requires an MPI parallel environment.
215 You will need the mpi4py_ Python package and an MPI launcher
216 (such as :command:`mpiexec`, :command:`mpirun`, a launcher provided by your HPC queuing system,
217 or whatever is provided by your favorite MPI package for your operating system).
218
219 .. _mpi_requirements:
220
221 MPI requirements
222 ----------------
223
224 For the ensemble simulations features, you will need an MPI installation.
225 On an HPC system, this means you will probably have to use :command:`module load`
226 to load a compatible set of MPI tools and compilers.
227 Check your HPC documentation or try :command:`module avail` to look for an
228 ``openmpi``, ``mpich``, or ``mvapich`` module and matching compiler module.
229 This may be as simple as::
230
231     module load gcc
232     module load mpicc
233
234 Note that the compilers loaded might not be the first compilers discovered
235 automatically by the build tools we will use below,
236 so you may have to specify compilers on the command line for consistency.
237 It may be necessary to require that GROMACS, gmxapi,
238 and the sample code are built with the same compiler(s).
239
240 Note that strange errors have been known to occur when mpi4py_ is built with
241 different a different tool set than has been used to build Python and gmxapi.
242 If the default compilers on your system are not sufficient for GROMACS or gmxapi,
243 you may need to build, e.g., OpenMPI or MPICH, and/or build mpi4py_ with a
244 specific MPI compiler wrapper. This can complicate building in environments such
245 as Conda_.
246
247 Set the MPICC environment variable to the MPI compiler wrapper and forcibly
248 reinstall mpi4py_::
249
250     export MPICC=`which mpicc`
251     pip install --no-cache-dir --upgrade --no-binary ":all:" --force-reinstall mpi4py
252
253 If you have a different MPI C compiler wrapper, substitute it for :command:`mpicc` above.
254
255 .. _installation:
256
257 Installing the Python package
258 =============================
259
260 We recommend using Python's `pip <https://pip.pypa.io/en/stable/>`_
261 package installer to automatically download, build, and install the latest
262 version of the gmxapi package into a Python
263 `virtual environment <https://docs.python.org/3/tutorial/venv.html>`_,
264 though it is also possible to install without a virtual environment.
265 If installing without a virtual environment as an un-privileged user,
266 you may need to set the CMake variable ``GMXAPI_USER_INSTALL``
267 (``-DGMXAPI_USER_INSTALL=ON`` on the :command:`cmake` command line)
268 and / or use the ``--user`` option with :command:`pip install`.
269
270 Recommended installation
271 ------------------------
272
273 The instructions in this section assume that *pip* is able to download files
274 from the internet. Alternatively, refer to :ref:`gmxapi offline install`.
275
276 Locate or install GROMACS
277 ^^^^^^^^^^^^^^^^^^^^^^^^^
278
279 You need a GROMACS installation that includes the gmxapi headers and library.
280 If GROMACS 2020 or higher is already installed,
281 *and* was configured with ``GMXAPI=ON`` at build time,
282 you can just source the :ref:`GMXRC <getting access to |Gromacs|>`
283 (so that the Python package knows where to find GROMACS)
284 and skip to the next section.
285
286 Otherwise, install a supported version of GROMACS.
287 When building GROMACS from source, be sure to configure cmake with the flag
288 ``-DGMXAPI=ON`` (default).
289
290 Set the environment variables for the GROMACS installation so that the gmxapi
291 headers and library can be found when building the Python package.
292 If you installed to a :file:`gromacs-gmxapi` directory in your home directory as
293 above and you use the :command:`bash` shell, do::
294
295     source $HOME/gromacs-gmxapi/bin/GMXRC
296
297 .. _gmxapi venv:
298
299 Set up a Python virtual environment
300 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
301
302 We recommend installing the Python package in a virtual environment.
303 If not installing in a virtual environment, you may not be able to install
304 necessary prerequisites (e.g. if you are not an administrator of the system you are on).
305
306 The following instructions use the :py:mod:`venv` module.
307 Alternative virtual environments, such as Conda_,
308 should work fine, but are beyond the scope of this document.
309 (We welcome contributed recipes!)
310
311 Depending on your computing environment, the Python 3 interpreter may be accessed
312 with the command :command:`python` or :command:`python3`. Use :command:`python --version` and
313 :command:`python3 --version` to figure out which you need to use. The following assumes
314 the Python 3 interpreter is accessed with :command:`python3`.
315
316 Create a Python 3 virtual environment::
317
318     python3 -m venv $HOME/myvenv
319
320 Activate the virtual environment. Your shell prompt will probably be updated with the name of the environment you
321 created to make it more obvious.
322
323 .. code-block:: none
324
325     $ source $HOME/myvenv/bin/activate
326     (myvenv)$
327
328 ..  note::
329
330     After activating the *venv*, :command:`python` and :command:`pip` are sufficient.
331     (The '3' suffix will no longer be necessary and will be omitted in the rest
332     of this document.)
333
334 Activating the virtual environment may change your shell prompt to indicate the
335 environment is active. The prompt is omitted from the remaining examples, but
336 the remaining examples assume the virtual environment is still active.
337 (Don't do it now, but you can deactivate the environment by running :command:`deactivate`.)
338
339 Install dependencies
340 ^^^^^^^^^^^^^^^^^^^^
341
342 It is always a good idea to update pip_, setuptools_, and wheel_ before installing
343 new Python packages::
344
345     pip install --upgrade pip setuptools
346
347 The gmxapi installer requires a few additional packages. It is best to make sure
348 they are installed and up to date before proceeding.
349
350 ::
351
352     pip install --upgrade cmake pybind11
353
354 For MPI, we use mpi4py_.
355 Make sure it is using the same MPI installation that we are building
356 GROMACS against and building with compatible compilers.
357
358 ::
359
360     python -m pip install --upgrade pip setuptools
361     MPICC=`which mpicc` pip install --upgrade mpi4py
362
363 .. seealso:: :ref:`mpi_requirements`
364
365 Install the latest version of gmxapi
366 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
367
368 Fetch and install the latest official version of gmxapi from the Python Packaging Index::
369
370     # Get the latest official release.
371     pip install gmxapi
372
373 The `PyPI repository <https://pypi.org/project/gmxapi/#history>`_
374 may include pre-release versions,
375 but :command:`pip` will ignore them unless you use the ``--pre`` flag::
376
377     # Get the latest version, including pre-release versions.
378     pip install --pre gmxapi
379
380 If :command:`pip` does not find your GROMACS installation, use one of the following
381 environment variables to provide a hint.
382
383 gmxapi_DIR
384 ~~~~~~~~~~
385
386 If you have a single GROMACS installation at :file:`/path/to/gromacs`, it is usually
387 sufficient to provide this location to :command:`pip` through the :envvar:`gmxapi_DIR`
388 environment variable.
389
390 Example::
391
392     gmxapi_DIR=/path/to/gromacs pip install gmxapi
393
394 GMXTOOLCHAINDIR
395 ~~~~~~~~~~~~~~~
396
397 If you have multiple builds of GROMACS distinguished by suffixes
398 (e.g. *_d*, *_mpi*, etcetera), or if you need to provide extra hints to :command:`pip`
399 about the software tools that were used to build GROMACS, you can specify a
400 directory in which the installer can find a CMake "tool chain".
401
402 In the following example, ``${SUFFIX}`` is the suffix that distinguishes the
403 particular build of GROMACS you want to target (refer to GROMACS installation
404 instructions for more information.) ``${SUFFIX}`` may simply be empty, or ``''``.
405
406 ::
407
408     GMXTOOLCHAINDIR=/path/to/gromacs/share/cmake/gromacs${SUFFIX} pip install gmxapi
409
410 Install from source
411 -------------------
412
413 You can also install the :py:mod:`gmxapi` Python package from within a local copy of
414 the GROMACS source repository. Assuming you have already obtained the GROMACS
415 source code and you are in the root directory of the source tree, you will find
416 the :py:mod:`gmxapi` Python package sources in the :file:`python_packaging/src` directory.
417
418 ::
419
420     cd python_packaging/src
421     pip install -r requirements.txt
422     pip install .
423
424 .. _gmxapi offline install:
425
426 Offline install
427 ---------------
428
429 If the required dependencies are already installed, you can do a quick installation
430 without internet access, either from the source directory or from a source archive.
431
432 For example, the last line of the previous example could be replaced with::
433
434     pip install --no-cache-dir --no-deps --no-index .
435
436 Refer to pip_ documentation for descriptions of these options.
437
438 If you have built or downloaded a source distribution archive, you can provide
439 the archive file to :command:`pip` instead of the ``.`` argument::
440
441     pip install gmxapi-0.1.0.tar.gz
442
443 In this example, the archive file name is as was downloaded from
444 `PyPI <https://pypi.org/project/gmxapi/#history>`_ or as built locally,
445 according to the following instructions.
446
447 Building a source archive
448 -------------------------
449
450 A source archive for the gmxapi python package can be built from the GROMACS
451 source repository using Python ``setuptools``.
452
453 Example::
454
455     pip install --upgrade setuptools
456     cd python_packaging/src
457     python setup.py sdist
458
459 This command will create a ``dist`` directory containing a source distribution
460 archive file. The file name has the form *gmxapi-<version>.<suffix>*, where
461 *<version>* is the version from the ``setup.py`` file, and *<suffix>* is
462 determined by the local environment or by additional arguments to ``setup.py``.
463
464 The new `build <https://pypa-build.readthedocs.io/en/latest/>`__ module is somewhat tidier.
465 It automatically manages a temporary venv with the necessary dependencies::
466
467     pip install --upgrade build
468     cd python_packaging/src
469     python -m build --sdist .
470
471 .. seealso::
472
473     Python documentation for
474     `creating a source distribution
475     <https://docs.python.org/3/distutils/sourcedist.html#creating-a-source-distribution>`_
476
477 Package maintainers may update the online respository by uploading a freshly
478 built ``sdist`` with ``python -m twine upload dist/*``
479
480 .. _gmxapi_package_documentation:
481
482 Accessing gmxapi documentation
483 ==============================
484
485 Documentation for the Python classes and functions in the gmx module can
486 be accessed in the usual ways, using ``pydoc`` from the command line or
487 ``help()`` in an interactive Python session.
488
489 The complete documentation (which you are currently reading)
490 can be browsed `online <http://manual.gromacs.org/current/gmxapi/>`__
491 or built from a copy of the GROMACS source repository.
492
493 Documentation is built from a combination of Python module documentation and
494 static content, and requires a local copy of the GROMACS source repository.
495
496 Build with GROMACS
497 ------------------
498
499 To build the full gmxapi documentation with GROMACS, configure GROMACS with
500 ``-DGMX_PYTHON_PACKAGE=ON`` and build the GROMACS documentation normally.
501 This will first build the *gmxapi* Python package and install it to a temporary
502 location in the build tree. Sphinx can then import the package to automatically
503 extract Python docstrings.
504
505 Note that this is an entirely CMake-driven installation and Python dependencies
506 will not be installed automatically. You can update your Python environment
507 (before configuring with CMake) using the :file:`requirements.txt` files provided
508 in the :file:`python_packaging/` directory of the repository. Example::
509
510     pip install -r python_packaging/requirements-docs.txt
511
512 or
513
514 ::
515
516     pip install -r python_packaging/requirements-test.txt
517
518 Sometimes the build environment can choose a different Python interpreter than
519 the one you intended.
520 You can set the ``Python3_ROOT`` or ``CMAKE_PREFIX_PATH`` CMake variable to
521 explicitly choose the Python installation or *venv* directory.
522
523 If you use pyenv or pyenv-virtualenv to dynamically manage your Python version,
524 you can help identify a particular version with ``pyenv version-name`` and the
525 directory with ``pyenv prefix {version}``. For example::
526
527     -DPython3_ROOT=$(pyenv prefix $(pyenv version-name))
528
529 Docker web server
530 -----------------
531
532 Alternatively, build the ``docs`` Docker image from ``python_packaging/docker/docs.dockerfile``
533 or pull a prebuilt image from DockerHub. Refer to the dockerfile or to
534 https://hub.docker.com/r/gmxapi/docs for more information.
535
536 .. todo::
537
538     Document sample_restraint package. Reference issue
539     `3027 <https://gitlab.com/gromacs/gromacs/-/issues/3027>`_
540
541 Testing
542 =======
543
544 Note `testing requirements`_ above.
545
546 After installing the :py:mod:`gmxapi` Python package,
547 you can run the Python test suite from the GROMACS source tree.
548 Example::
549
550     # Assuming you are in the root directory of the repository:
551     pytest python_packaging/src/test/
552
553 Refer to :file:`python_packaging/README.md` for more detailed information.
554
555 .. _gmxapi install troubleshooting:
556
557 Troubleshooting
558 ===============
559
560 AttributeError: module 'enum' has no attribute 'IntFlag'
561 --------------------------------------------------------
562
563 If you had older versions of some of the dependencies installed,
564 you might have picked up a transitive dependency on the ``enum34`` package.
565 Try::
566
567     pip uninstall -y enum34
568
569 and see if that fixes the problem. If not, try a fresh virtual environment
570 (see above) to help narrow down the problem before you
571 `open an issue <https://gitlab.com/gromacs/gromacs/-/issues/>`_.
572
573 Errors regarding pybind11
574 -------------------------
575
576 An error may occur in ``setup.py`` with output that contains something like the following::
577
578       ModuleNotFoundError: No module named 'pybind11'
579       Building wheel for gmxapi (pyproject.toml): finished with status 'error'
580       ERROR: Failed building wheel for gmxapi
581     Failed to build gmxapi
582     ERROR: Could not build wheels for gmxapi, which is required to install pyproject.toml-based projects
583
584 The important information here is that ``pybind11`` was not found.
585
586 Build dependencies aren't always automatically installed.
587 Even if you are using ``pip``, you may have disabled automatic dependency fulfillment with an option like ``--no-build-isolation`` or ``--no-deps``.
588
589 In any case, the problem should be resolved by explicitly installing the ``pybind11``
590 Python package before attempting to build ``gmxapi``::
591
592     pip install --upgrade pybind11
593
594 Couldn't find the ``gmxapi`` support library?
595 ---------------------------------------------
596
597 If you don't want to "source" your :ref:`GMXRC <getting access to |Gromacs|>` file, you
598 can tell the package where to find a gmxapi compatible GROMACS installation with
599 ``gmxapi_DIR``. E.g. ``gmxapi_DIR=/path/to/gromacs pip install .``
600
601 Before updating the ``gmxapi`` package it is generally a good idea to remove the
602 previous installation and to start with a fresh build directory. You should be
603 able to just ``pip uninstall gmxapi``.
604
605 Do you see something like the following?
606
607 .. code-block:: none
608
609    CMake Error at gmx/core/CMakeLists.txt:45 (find_package):
610       Could not find a package configuration file provided by "gmxapi" with any
611       of the following names:
612
613         gmxapiConfig.cmake
614         gmxapi-config.cmake
615
616       Add the installation prefix of "gmxapi" to CMAKE_PREFIX_PATH or set
617       "gmxapi_DIR" to a directory containing one of the above files.  If "gmxapi"
618       provides a separate development package or SDK, be sure it has been
619       installed.
620
621 This could be because
622
623 * GROMACS is not already installed
624 * GROMACS was built without the CMake variable ``GMXAPI=ON``
625 * or if ``gmxapi_DIR`` (or ``GROMACS_DIR``) is not a path containing directories
626   like ``bin`` and ``share``.
627
628 If you are not a system administrator you are encouraged to install in a Python
629 virtual environment, created with virtualenv or Conda_.
630 Otherwise, you will need to specify the ``--user`` flag to ``pip``.
631
632 Two of the easiest problems to run into are incompatible compilers and
633 incompatible Python. Try to make sure that you use the same C and C++
634 compilers for GROMACS, for the Python package, and for the sample
635 plugin. These compilers should also correspond to the :command:`mpicc` compiler
636 wrapper used to compile mpi4py_. In order to build the Python
637 package, you will need the Python headers or development installation,
638 which might not already be installed on the machine you are using. (If
639 not, then you will get an error about missing :file:`Python.h` at some
640 point.) If you have multiple Python installations (or modules available
641 on an HPC system), you could try one of the other Python installations,
642 or you or a system administrator could install an appropriate Python dev
643 package. Alternatively, you might try installing your own Anaconda or
644 MiniConda in your home directory.
645
646 If an attempted installation fails with CMake errors about missing
647 “gmxapi”, make sure that Gromacs is installed and can be found during
648 installation. For instance,
649
650 ::
651
652     gmxapi_DIR=/Users/eric/gromacs python setup.py install --verbose
653
654 Pip and related Python package management tools can be a little too
655 flexible and ambiguous sometimes. If things get really messed up, try
656 explicitly uninstalling the :py:mod:`gmxapi` module and its dependencies, then do
657 it again and repeat until :command:`pip` can no longer find any version of any
658 of the packages.
659
660 ::
661
662     pip uninstall gmxapi
663     pip uninstall cmake
664     # ...
665
666 Successfully running the test suite is not essential to having a working
667 :py:mod:`gmxapi` package. We are working to make the testing more robust, but
668 right now the test suite is a bit delicate and may not work right, even
669 though you have a successfully built the :py:mod:`gmxapi` package. If you want to
670 troubleshoot, though, the main problems seem to be that automatic
671 installation of required python packages may not work (requiring manual
672 installations, such as with :command:`pip install somepackage`) and ambiguities
673 between python versions. 
674
675 If you are working in a development branch of the repository, note that
676 the upstream branch may be reset to ``master`` after a new release is
677 tagged. In general, but particularly on the ``devel`` branch, when you
678 do a :command:`git pull`, you should use the ``--rebase`` flag.
679
680 If you fetch this repository and then see a git status like this::
681
682     $ git status
683     On branch devel
684     Your branch and 'origin/devel' have diverged,
685     and have 31 and 29 different commits each, respectively.
686
687 then :py:mod:`gmxapi` has probably entered a new development cycle. You can
688 do :command:`git pull --rebase` to update to the latest development branch.
689
690 If you do a :command:`git pull` while in ``devel`` and get a bunch of unexpected
691 merge conflicts, do :command:`git merge --abort; git pull --rebase` and you should
692 be back on track.
693
694 If you are developing code for gmxapi, this should be an indication to
695 rebase your feature branches for the new development cycle.
696
697 .. _cmake: https://pypi.org/project/cmake/
698
699 .. _Conda: https://docs.conda.io/en/latest/
700
701 .. _mpi4py: https://pypi.org/project/mpi4py/
702
703 .. _networkx: https://pypi.org/project/networkx/
704
705 .. _numpy: https://www.numpy.org/
706
707 .. _pip: https://pip.pypa.io/en/stable/
708
709 .. _scikit-build: https://pypi.org/project/scikit-build/
710
711 .. _setuptools: https://pypi.org/project/setuptools/
712
713 .. _wheel: https://pypi.org/project/wheel/