2. Installation¶
EQTransformer is a Python 3.x package that uses libraries from Tensorflow and Obspy.
2.1. Installation via conda (recommended)¶
The following will download and install EQTransformer that supports a variety of platforms, including Windows, macOS, and Linux operating systems. Note that you will need to have Python 3.x (3.6 or 3.7) installed.
It is recommended that you use a Python virtual environment (e.g., conda) to test the EQTransformer package. Please follow the conda user guide to install conda if you do not have either a miniconda or anaconda installed on your machine. Once you have conda installed, you can use Terminal or an Anaconda Prompt to create a Python virtual environment. Check managing anaconda environment for more information.
conda create -n eqt python=3.7
Conda activate eqt
conda install -c smousavi05 eqtransformer
This will download and install EQTransformer and all required packages (including Tensorflow and Obspy) into your machine. Note: Keep executing the last line if it did not succeed in the first try.
2.2. Installation via PyPI¶
If you already have Obspy installed on your machine, you can get EQTransformer through PyPI:
pip install EQTransformer
If you don’t have pip installed, this Python installation guide can guide you through the process.
2.3. Installation from Source¶
The sources for EQTransformer can be downloaded from the Github repo.
You can either clone the public repository:
git clone git://github.com/smousavi05/EQTransformer
Once you have a copy of the source, you can cd to EQTransformer directory and install it with:
python setup.py install