There are two ways to install dustmaps.

1. Using pip

From the commandline, run

pip install dustmaps

You may have to use sudo.

Next, we’ll configure the package and download the dust maps we’ll want to use. Start up a python interpreter and type:

from dustmaps.config import config
config['data_dir'] = '/path/to/store/maps/in'

import dustmaps.sfd

import dustmaps.planck

import dustmaps.bayestar

import dustmaps.iphas

import dustmaps.marshall

import dustmaps.chen2014

All the dust maps should now be in the path you gave to config['data_dir']. Note that these dust maps can be very large - some are several Gigabytes! Only download those you think you’ll need.

2. Using

An alternative way to download dustmaps, if you don’t want to use pip, is to download or clone the respository from Then, from the root directory of the package, run

python install --large-data-dir=/path/to/store/maps/in

Then, fetch the maps you’d like to use:

python fetch --map-name=sfd
python fetch --map-name=planck
python fetch --map-name=bayestar
python fetch --map-name=iphas
python fetch --map-name=marshall
python fetch --map-name=chen2014

Since these maps are very large - up to several Gigabytes - be careful to only download those you think you’ll need. That’s it!