Le 28/04/2012 23:56, Eric Lemoine a écrit :
Hi

I'm looking at installing mapnik2 using `easy_install mapnik2` or `pip
install mapnik2`. I've given it a try tonight, but failed. Here's what
I did:

Install some development packages for my Ubuntu distro:

$ sudo add-apt-repository ppa:mapnik/nightly-2.0
$ sudo apt-get update
$ sudo apt-get install mapnik-utils libboost-python1.42-dev libmapnik-dev

Create a virtualenv (I use virtualenvwrapper):

$ mkvirtualenv --no-site-packages --distribute mapnik2

And install mapnik2 in the virtualenv:

(mapnik2)$ easy_install mapnik2

This gives me:

Exception: Cant find boost_python lib!

This is because pymapnik2's setup.py script looks for
libboost_python.so, which does not exist for me. To fix that I've used
this:

$ sudo ln -sf /usr/lib/libboost_python-py26.so.1.42.0
/usr/lib/libboost_python.so

I don't like it, but this has allowed me to go a bit further.

The next error - the one that's actually blocking me - is a compilation error:

cpp/mapnik_text_symbolizer.cpp: In function ‘void export_text_symbolizer()’:
cpp/mapnik_text_symbolizer.cpp:171: error: ‘TOP’ was not declared in this scope
cpp/mapnik_text_symbolizer.cpp:172: error: ‘MIDDLE’ was not declared
in this scope
cpp/mapnik_text_symbolizer.cpp:173: error: ‘BOTTOM’ was not declared
in this scope
error: Setup script exited with error: command 'gcc' failed with exit status 1

Altough not sure, I think I get this error because of a mismatch
between the mapnik header files (installed by  libmapnik-dev package)
and the mapnik cpp source code included in the Python package. The
Python package is mapnik2-2.0-r2615.tar.gz from
http://pypi.python.org/packages/source/m/mapnik2/, which I'm not sure
what it is exactly.

Is there any know solution to my problem? Are there other people
installing, or trying to install, mapnik2 using
easy_install/pip/disutils? I'd appreciate any insight or
recommendation.

I do using minitage + buildout (distribute under the hood).

Thank you.

You need to build current pymapnik2 against the 2.0 release (2.0.0).

I'll try in the WE to make a release of pymapnik2 building upon 2.0.1


--
Cordialement,
kiorky

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to