Detailed installation instructions¶
Pyrocko can be installed under any operating system where its prerequisites are available. This document describes details about its requirements which are needed when a standard install is not possible or conflicts arise.
For standard install instructions, head on over to
Prerequisites¶
The following software packages must be installed before Pyrocko can be installed from source:
- Optional Python modules:
Jinja2 (required for the fomosto report subcommand)
nosetests (to run the unittests)
coverage (unittest coverage report)
- Manually install these optional software tools:
GMT (4 or 5, only required for the
pyrocko.plot.automap
module)slinktool (optionally, if you want to use the
pyrocko.streaming.slink
module)rdseed (optionally, if you want to use the
pyrocko.io.rdseed
module)QSEIS (optional, needed for the Fomosto
qseis.2006a
backend)QSSP (optional, needed for the Fomosto
qssp.2010
backend)PSGRN/PSCMP (optional, needed for the Fomosto
psgrn.pscmp
backend)
Download, compile and install Pyrocko from source¶
The following examples will install Pyrocko from source, on Linux or MacOS. For Windows “from source” installs, please refer to Installation on Windows: From source.
Because of the many different and conflicting ways how you can manage your Python installations, be sure to understand the basics of Python package management before proceeding.
For your convenience, we are using Pyrocko’s “from source” installation helper
install.py
here. Run python install.py --help
for more information. The
native commands to be run are printed before execution, and have to be
confirmed by you.
Download (clone) the Pyrocko project directory with git:
cd ~/src/ # or wherever you keep your source packages git clone https://git.pyrocko.org/pyrocko/pyrocko.git pyrocko
Change to the Pyrocko project directory:
cd ~/src/pyrocko/
Install prerequisites using your method of choice:
# (a) If you manage the prerequisites with the system's package manager: python3 install.py deps system # or (b), if you manage the prerequisites with pip: python3 install.py deps pip # or (c), if you manage your installation with conda: python3 install.py deps conda
Build and install Pyrocko:
# If you want to install for single user (pip, venv, conda): python3 install.py user # or, if you want to install system wide: python3 install.py system
Note: With pip, if you do not specify –no-deps, it will automatically download and install missing dependencies. Unless you manage your installations exclusively with pip, omitting this flag can lead to conflicts.
Note: The intention of using –no-build-isolation is to compile exactly against the already installed prerequisites. If you omit the flag, pip will compile against possibly newer versions which it downloads and installs into a temporary, isolated environment.
Note: If you have previously installed Pyrocko using other tools like e.g. pip, or conda, you should first remove the old installation. Otherwise you will end up with two parallel installations which will cause trouble.
Update¶
If you later would like to update Pyrocko, run the following commands (this assumes that you have used git to download Pyrocko).
Change to the Pyrocko project directory (step 2. above), then update it:
git pull origin master --ff-only
Then build and reinstall Pyrocko as descibed in step 4.