python-mapnik icon indicating copy to clipboard operation
python-mapnik copied to clipboard

setup.py install fails on Debian Jessie

Open Biboba opened this issue 8 years ago • 4 comments

Hello,

I have some troubles to install python bindings for mapnik on Debian Jessie. Mapnik 3.0.0 is installed : mapnik-config -v => 3.0.0

Running "python setup.py install" sends me the following output and error : running install running bdist_egg running egg_info writing mapnik.egg-info/PKG-INFO writing top-level names to mapnik.egg-info/top_level.txt writing dependency_links to mapnik.egg-info/dependency_links.txt reading manifest file 'mapnik.egg-info/SOURCES.txt' writing manifest file 'mapnik.egg-info/SOURCES.txt' installing library code to build/bdist.linux-i686/egg running install_lib running build_py running build_ext building 'mapnik._mapnik' extension c++ -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/mapnik_color.cpp -o build/temp.linux-i686-2.7/src/mapnik_color.o -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/gdal -I/usr/include/postgresql -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -DSHAPE_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -DHAVE_LIBXML2 -std=c++11 -DBOOST_NO_CXX11_SCOPED_ENUMS -Wall -pthread -ftemplate-depth-300 -Wsign-compare -Wshadow -O3 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ src/mapnik_color.cpp:27:37: fatal error: mapnik/warning_ignore.hpp: Aucun fichier ou dossier de ce type

include <mapnik/warning_ignore.hpp

compilation terminated. error: command 'c++' failed with exit status 1

Any idea where does this problem come from ?

Thanks for your help,

Nicolas

Biboba avatar Apr 14 '16 16:04 Biboba

So there is currently no way to use mapnik with python 3?

lordi avatar May 03 '16 14:05 lordi

3.0 is the version of Mapnik. I am using Python 2.7.9 I know it is just a matter of link somewhere but I quite don't understand because I successfully installed mod_tile and renderd which are talking with Mapnik without any issue and I am using a clean Jessie VM so I don't know what I missed. One thing weird though is that : $ updatedb $ locate mapnik/warning_ignore.hpp does not find anything ...

Biboba avatar May 03 '16 18:05 Biboba

On Debian there can be two binaries in PATH, python and python3, provided by the 'python' and 'python3' packages from official repository.

# apt-get install -y python
- or -
# apt-get install -y python3

$ python --version
- or -
$ python3 --version

strarsis avatar Jun 07 '16 11:06 strarsis

@Biboba Concerning the missing mapnik/warning_ignore.hpp problem, that file is relatively new invention and not yet existing in your version 3.0.0 of Mapnik. You can check it out in https://github.com/mapnik/mapnik/tree/v3.0.0

Concerning Python 3, Mapnik Python bindings work well with Python 3. Also simultaneously with Python 2 installation.

talaj avatar Aug 24 '16 20:08 talaj