# WRADLIB\_DATA' environment variable not set

**URL:** <https://openradar.discourse.group/t/wradlib-data-environment-variable-not-set/168>\
**Category:** General\
**Created:** [February 12, 2023, 8:16pm UTC](https://openradar.discourse.group/t/wradlib-data-environment-variable-not-set/168 "2023-02-12T20:16:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SAMA](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@SAMA](https://openradar.discourse.group/u/SAMA)\
**Post date:** [February 12, 2023, 8:16pm UTC](https://openradar.discourse.group/t/wradlib-data-environment-variable-not-set/168/1 "2023-02-12T20:16:20Z")

</div>

![Screenshot from 2023-02-12 22-38-51](https://global.discourse-cdn.com/free1/uploads/openradar/original/1X/c0d6d015adf06366899703c092fce257d9be2f1d.png)

Dear Support Team,

I hope this email finds you well. I am writing to inform you of an error that I encountered while using your software. I have recently installed the WRADLIB library and while trying to run the program, I received the following error message:

“WRADLIB\_DATA environment variable not set”

I am not sure what this error means and how to resolve it. I would appreciate if you could provide some guidance on how to resolve this issue.

Additionally, please let me know if there is any further information that you require from me to assist in resolving this error.

Thank you for your time and assistance. I look forward to hearing back from you.

Best regards,  
Bukya Sama

---

<div class="post-metadata">

**Author:** ![syedhamidali](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/syedhamidali/32/377_2.png) [@syedhamidali](https://openradar.discourse.group/u/syedhamidali)\
**Post date:** [February 12, 2023, 11:28pm UTC](https://openradar.discourse.group/t/wradlib-data-environment-variable-not-set/168/2 "2023-02-12T23:28:35Z")

</div>

You can either comment out this line like `# wrl_data_path = os.environ.get("WRADLIB_DATA", None)`  
or you can clone “WRADLIB\_DATA” from GitHub by running the following command in the terminal or command prompt:  
`git clone https://github.com/wradlib/wradlib-data.git`,  
and set an environment variable.  
Or you can also do something like this after cloning the repo:

```auto
import wradlib as wrl
import os
os.environ["WRADLIB_DATA"] = "path\to\cloned\repository\"

```

---

<div class="post-metadata">

**Author:** ![kmuehlbauer](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/kmuehlbauer/32/439_2.png) [@kmuehlbauer](https://openradar.discourse.group/u/kmuehlbauer)\
**Post date:** [February 13, 2023, 8:17am UTC](https://openradar.discourse.group/t/wradlib-data-environment-variable-not-set/168/3 "2023-02-13T08:17:02Z")

</div>

@SAMA I’m adding a bit of context here. If you are working with **radar data of your own and not using the example data provided in [wradlib-data](https://github.com/wradlib/wradlib-data)** you can completely drop the usage of `WRADLIB_DATA` and the helper functions `wradlib.util.get_wradlib_data_path`/`wradlib.util.get_wradlib_data_file`.

These functions are used to get the path for the directory where the [wradlib-data](https://github.com/wradlib/wradlib-data) is installed, which should be given in `WRADLIB_DATA` env var. It is normally used in wradlib testing framework as well as in the creation of the [wradlib-notebooks](https://github.com/wradlib/wradlib-notebooks).

So for your example (screenshots are very nice, but a text snippet of the code you are running would be better for copy&pasting) you just would do as @syedhamidali suggested already:

```python
import wradlib as wrl

print(wrl. __version__ )
fpath = "/media/user/workBench/dwr_mosdac/RCTLS_24JUN2021_051159_L2B_STD.nc"
outdict = wrl.io.read_generic_netcdf(fpath)
for key in outdict.keys():
    print(key)

```

Just as a heads-up for those who are using the wradlib-data. We are moving the wradlib-data repo to use pooch to retrieve the data without pre-installing. This works along the lines of other data-packages donwloading data on first request and storing into user space (eg. under `.cache` on Linux).
