Skip to content
Snippets Groups Projects

Installation

This document describes installation instructions for users. For those that wish to modify or develop custom code within geomag-algorithms, or prefer to install the Docker container, please see the following documents:

  • Develop provides installation instruction for developers.
  • Docker describes Docker container installation and usage.

Requirements

  • Python 3.8 to 3.11
  • ObsPy 1.4.0

Procedure

Option 1: Anaconda/Miniconda (https://conda.io/miniconda.html)

  1. Set up environment & install dependencies
conda create --name=geomagenv --channel conda-forge python=3 obspy pycurl
source activate geomagenv
  1. Install geomagio
pip install git+https://code.usgs.gov/ghsc/geomag/geomag-algorithms.git

Option 2: Venv and pip

  1. Create a virtual environment using venv (recommended)
python -m venv path/to/your/environment

venv is a tool included with Python 3.3 and above that allows you to create isolated Python environments, each with their own set of installed packages, which can help you manage different projects without package conflicts. Each environment is stored within a folder of the user's choosing.

You can find more information on using venv here.

  1. Install geomagio within the virtual environment
source path/to/your/environment/bin/activate
pip install git+https://code.usgs.gov/ghsc/geomag/geomag-algorithms.git

Note: geomagio is the Python module for interfacing with geomag-algorithms.