Newer
Older
# 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](./develop.md) provides installation instruction for developers.
> - [Docker](./install_docker.md) 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
```bash
conda create --name=geomagenv --channel conda-forge python=3 obspy pycurl
source activate geomagenv
```
2. Install **geomagio**
```bash
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)
```bash
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](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment).
2. Install geomag-algorithms from within the virtual environment
```bash
source path/to/your/environment/bin/activate
pip install git+https://code.usgs.gov/ghsc/geomag/geomag-algorithms.git
```