pythonmapnik

How can I check what version of mapnik I am using in python?


I am using Python 3.5 and the mapnik library bindings available through the python-mapnik project. I have multiple versions of the mapnik library on my machine, how can I do a sanity check to see which version of mapnik the is being used by the python bindings?


Solution

  • There may be a better way but the package in question has a module paths which can be inspected to reveal what is being bound:

    import mapnik
    print(mapnik.paths.__all__)
    

    Example output:

    ['/usr/lib/mapnik/3.0', '/usr/lib/mapnik/3.0/input', '/usr/share/fonts']