Installation#

GWpy PyPI version badge Supported Python versions

Quick Install#

For most users, we recommend installing via conda:

conda install -c conda-forge gwpy
pip install gwpy
uv pip install gwpy
pip install git+https://gitlab.com/gwpy/gwpy.git

New to Python?

We recommend uv, an extremely fast Python package and project manager. For 99% of operations, just replace pip install with uv pip install.

For environments that need more than just Python packages, we recommend conda-forge, a community-driven Conda package channel and distribution (without the licensing issues of Anaconda).


Detailed Installation#

Creating a Virtual Environment#

It’s good practice to install GWpy in a virtual environment:

conda create -n gwpy-env -c conda-forge gwpy
uv venv
uv pip install gwpy

Installing from Source#

To install the latest development version:

Install GWpy from source#
git clone https://gitlab.com/gwpy/gwpy.git
cd gwpy
pip install .

For development with editable install:

Install GWpy from source in editable mode#
pip install -e . --group dev

Optional Dependencies#

GWpy has several optional dependencies for additional functionality:

Feature

Install command

Description

GWF I/O

pip install gwpy[gwf]

Read/write GWF (gravitational wave frame) files

Authentication

pip install gwpy[auth]

Access proprietary data with credentials

Advanced SQL

pip install gwpy[sql]

Enhanced database query capabilities

Astronomical calculations

pip install gwpy[astro]

Compute inspiral ranges and other astrophysical quantities

Pelican data access

pip install gwpy[pelican,scitokens]

Read data from Pelican servers

Type checking

pip install gwpy[typing]

Install type checking dependencies (e.g., optype)

Note

Conda doesn’t support optional dependencies, so you may have to install them manually, or use pip within your conda environment.

For details on some of the gravitational-wave specific optional dependencies, see External packages.


Verifying Installation#

Check that GWpy is installed correctly:

Verify GWpy installation#
python -c "import gwpy; print(gwpy.__version__)"

You should see the version number printed, e.g., 3.0.0.

Test with a simple example:

Simple GWpy test#
from gwpy.timeseries import TimeSeries
import numpy as np

# Create a simple time series
data = TimeSeries(np.random.random(1000), sample_rate=1)
print(data)

If this runs without errors, you’re all set!


Need Help?#

If you’re still having trouble: