Installation Instructions#

The conda Python distribution is recommended, but you can use any Python distribution you see fit.

Install `conda`

See also

Miniconda package management system: https://docs.conda.io/en/latest/miniconda.html

  1. Install miniconda for your operating system:

  2. We recommend to create a new conda environment:

conda create -n twistpy python=3.9
conda activate twistpy

Note

We have recently moved to Python 3.9 since Python 3.7 reached end of life in June 2023. If you still have an older installation, we recommend to first save your old environment ($conda create –name twistpy37 –clone twistpy) then delete the old environment ($conda remove –name twistpy –all) and create a new one with Python 3.9 as described above.

  1. Install the dependencies:

conda install obspy pandas matplotlib h5py scikit-learn spectrum

Note

Make sure the twistpy environment is active when using TwistPy and for all the following steps on this page!

Install TwistPy

Clone TwistPy

git clone https://github.com/solldavid/TwistPy.git
cd TwistPy
conda activate twistpy
pip install -e .

Update TwistPy

To update TwistPy please change to the TwistPy directory and run

git pull

If that does not work for some reason (e.g. the TwistPy repository has seen local changes, …) please do the following

git fetch origin main
git reset --hard origin/main

Warning

All your local changes will be deleted!

If the TwistPy dependencies changed, just run

pip install -e .

again. Make sure the correct conda environment is active.