[Python] python-mapnik on ubuntu 22.04

Discussão em 'Python' iniciado por Stack, Julho 19, 2025.

  1. Stack

    Stack Membro Participativo

    I can't use some mapnik comands with python.

    I installed python3-mapnik with the command apt install python3-mapnik.

    I imported mapnik in python3.10, but when try to use the library, it doesn't work:

    import mapnik # ok
    mapnik.Projection('+init=epsg:31467') # Any use of projections things
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    RuntimeError: Cannot initialize projection '+init=epsg:31467 ' without proj4 support (-DMAPNIK_USE_PROJ4)


    I sawin https://github.com/mapnik/mapnik/blob/master/src/projection.cpp that -DMAPNIK_USE_PROJ4 seems to not be defined, and I don't know if I can change it.

    Do you have any idea of how I can use mapnik on python ?

    Thank you

    Continue reading...

Compartilhe esta Página