Last active
November 10, 2019 13:51
-
-
Save nobbynobbs/4af763b77692f7c08c73f5b482d7b9ef to your computer and use it in GitHub Desktop.
how to install geospatial libraries for python on ubuntu 18.04 (GDAL, mapnik)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GDAL | |
sudo apt install gdal-bin libgdal-dev | |
pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal" | |
# MAPNIK | |
sudo apt install mapnik-utils libmapnik-dev libboost-all-dev | |
mapnik-config -v # check mapnik version | |
git clone https://github.com/mapnik/python-mapnik.git | |
cd python-mapnik | |
git checkout v3.0.x # checkout if your mapnik version is 3.0.x | |
# with activated virtualenv!!! | |
python setup.py install | |
cd .. | |
python | |
>> import mapnik | |
>> print(mapnik.mapnik_version()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment