# Using nds2 on Google colab?

**URL:** <https://ask.igwn.org/t/using-nds2-on-google-colab/783>\
**Category:** Uncategorized\
**Created:** [June 13, 2023, 1:33pm UTC](https://ask.igwn.org/t/using-nds2-on-google-colab/783 "2023-06-13T13:33:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecm](https://yyz1.discourse-cdn.com/flex031/user_avatar/ask.igwn.org/ecm/32/16_2.png) [@ecm](https://ask.igwn.org/u/ecm)\
**Post date:** [June 13, 2023, 1:33pm UTC](https://ask.igwn.org/t/using-nds2-on-google-colab/783/1 "2023-06-13T13:33:24Z")

</div>

Hi!

I am trying to make call with the nds2 client from Google colab.  
So far I failed because the nds2 module does not appear to be  
installed automatically by pip. The following lines:

> ! pip install -q ‘gwpy==3.0.4’  
> from gwpy.timeseries import TimeSeries  
> data = TimeSeries.fetch(‘L1:ISI-GND\_STS\_ITMY\_Z\_BLRMS\_30M\_100M’, start=1263229218, end=1263229228, host=‘[losc-nds.ligo.org](http://losc-nds.ligo.org)’)

results in the following error:

> → 308 import nds2  
> 309 # pylint: disable=no-member  
> 310
> 
> ModuleNotFoundError: No module named ‘nds2’

The nds2 client packages do not seem to be available with pip:

> !pip install nds2-client python-nds2-client

> Looking in indexes: [Simple index](https://pypi.org/simple), [https://us-python.pkg.dev/colab-wheels/public/simple/](https://us-python.pkg.dev/colab-wheels/public/simple/)  
> ERROR: Could not find a version that satisfies the requirement nds2-client (from versions: none)  
> ERROR: No matching distribution found for nds2-client

Any hint?

Eric

---

<div class="post-metadata">

**Author:** ![jonah](https://yyz1.discourse-cdn.com/flex031/user_avatar/ask.igwn.org/jonah/32/10_2.png) [@jonah](https://ask.igwn.org/u/jonah)\
**Post date:** [June 13, 2023, 1:44pm UTC](https://ask.igwn.org/t/using-nds2-on-google-colab/783/2 "2023-06-13T13:44:41Z")

</div>

@ecm That’s right. The NDS2 client is currently packaged for conda, but not pypi. This is a problem for cloud platforms like Google Co-lab that rely on pip to install packages. I have the same problem on `streamlit`, which also relies on `pip`.

I don’t have a solution, other than to request that the NDS2 client be packaged for `pypi`. You could add a ticket for that (and/or send an email), here:

> **[nds / nds2-client · GitLab](https://git.ligo.org/nds/nds2-client)**
>
> C/C++/Python/Matlab/Octave/Java clients for retrieving data from NDS servers. This repository contains historic information, but for client 0.15.2 and earlier the SVN is considered canonical.

---

<div class="post-metadata">

**Author:** ![ecm](https://yyz1.discourse-cdn.com/flex031/user_avatar/ask.igwn.org/ecm/32/16_2.png) [@ecm](https://ask.igwn.org/u/ecm)\
**Post date:** [June 13, 2023, 2:36pm UTC](https://ask.igwn.org/t/using-nds2-on-google-colab/783/3 "2023-06-13T14:36:45Z")

</div>

Thank you @jonah ! I’ve opened a ticket.

E.

---

<div class="post-metadata">

**Author:** ![aghalsa](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@aghalsa](https://ask.igwn.org/u/aghalsa)\
**Post date:** [November 15, 2024, 7:12pm UTC](https://ask.igwn.org/t/using-nds2-on-google-colab/783/4 "2024-11-15T19:12:35Z")

</div>

Any update on being able to use nds2 on Colab?

---

<div class="post-metadata">

**Author:** ![aghalsa](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@aghalsa](https://ask.igwn.org/u/aghalsa)\
**Post date:** [November 15, 2024, 7:30pm UTC](https://ask.igwn.org/t/using-nds2-on-google-colab/783/5 "2024-11-15T19:30:27Z")

</div>

I did

```auto
!pip install -q condacolab
import condacolab
condacolab.install()
!conda install -c conda-forge python-nds2-client

```

That seems to have worked for now for colab notebook

---

<div class="post-metadata">

**Author:** ![jonah](https://yyz1.discourse-cdn.com/flex031/user_avatar/ask.igwn.org/jonah/32/10_2.png) [@jonah](https://ask.igwn.org/u/jonah)\
**Post date:** [November 19, 2024, 11:52pm UTC](https://ask.igwn.org/t/using-nds2-on-google-colab/783/6 "2024-11-19T23:52:32Z")

</div>

That’s a great trick! Thank you for sharing it.

---

<div class="post-metadata">

**Author:** ![kokeyama](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@kokeyama](https://ask.igwn.org/u/kokeyama)\
**Post date:** [October 10, 2025, 5:53am UTC](https://ask.igwn.org/t/using-nds2-on-google-colab/783/7 "2025-10-10T05:53:23Z")

</div>

Hi! I’m also trying to use nds2 on google collab.  
aghalsa’s suggestion  
`!pip install -q condacolab`  
`import condacolab`  
`condacolab.install()`  
`!conda install -c conda-forge python-nds2-client`  
worked, but I still cannot  
`import nds2`

getting

```auto
ModuleNotFoundError: No module named 'nds2'

```

What do I miss?

---

<div class="post-metadata">

**Author:** ![Shan909](https://yyz1.discourse-cdn.com/flex031/user_avatar/ask.igwn.org/shan909/32/510_2.png) [@Shan909](https://ask.igwn.org/u/Shan909)\
**Post date:** [October 12, 2025, 6:56pm UTC](https://ask.igwn.org/t/using-nds2-on-google-colab/783/8 "2025-10-12T18:56:19Z")

</div>

i think you need to import python-nds2-client as nds2
