Installation

To install the latest version, run

$ pip3 install --upgrade mapsbr

Dependencies

Most of these python packages depend on another C++ library called geos, so you’ll need to install this. Here’s their GitHub repo.

In short, if you’re running Ubuntu, for example, you can install their development libraries with the following command

$ sudo apt install libgeos++-dev libgeos-dev

Troubleshooting

If using the library cause a segmentation fault, it is likely because of some conflict regarding the installation of libgeos.

What solved it for me was to uninstall shapely and the reinstall it with

$ pip3 install --no-binary shapely shapely

Check out this issue for details.