Problem installing Python bindings into virtualenv with pip on Ubuntu 12.04

769 views
Skip to first unread message

Fabian Büchler

unread,
Jun 5, 2013, 4:58:52 AM6/5/13
to map...@googlegroups.com
Hello,

I'm experiencing problems installing the Mapnik Python bindings into a virtualenv using pip on Ubuntu 12.04.

It works if I just install python-mapnik via apt-get and use the --system-site-packages option when creating the virtualenv.

$ sudo apt-get install python-mapnik 
$ mkvirtualenv --system-site-packages mapniktest 
(mapniktest)$ python
>>> import mapnik 
>>> # works

That's usually not what you want to do with virtualenvs, however.
Without the system site packages, I tried installing the bindings via pip:

$ mkvirtualenv --no-site-packages mapniktest 
(mapniktest)$ pip install mapnik2

That fails with the following error:

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]

/usr/include/mapnik/marker_cache.hpp: In function ‘void {anonymous}::set_marker_type(mapnik::markers_symbolizer&, const string&)’:

/usr/include/mapnik/marker_cache.hpp:57:17: error: invalid use of non-static data member ‘mapnik::marker_cache::known_svg_prefix_’

cpp/mapnik_markers_symbolizer.cpp:57:42: error: from this location

/usr/include/mapnik/marker_cache.hpp:57:17: error: invalid use of non-static data member ‘mapnik::marker_cache::known_svg_prefix_’

cpp/mapnik_markers_symbolizer.cpp:61:42: error: from this location

error: command 'gcc' failed with exit status 1
 

I did follow the UbuntuInstallationGuide in the mapnik wiki and installed both mapnik2.1.0 and boost PPAs.
Also, I installed all the libboost-* packages, the libmapnik-(dev) and mapnik-utils.


Do you have any advice for me on the issue?

Also, which code is current for the python bindings now?
The one on PyPI seems to be from pymapnik2...

Thanks and BR,
Fabian

Vladimir Abramov

unread,
Jun 15, 2013, 12:24:01 PM6/15/13
to map...@googlegroups.com
Same error there. I have Ubuntu 13.04 and there is no mapnik 2.1 ppa for raring. So 2.2 version is installed.
There is no problem on mac ox with brew install mapnik 2.1. and boost. 

Looks like pypi package is strongly tied to mapnik version and https://github.com/mapnik/pymapnik2/ is slightly outdated    

среда, 5 июня 2013 г., 10:58:52 UTC+2 пользователь Fabian Büchler написал:

Dane Springmeyer

unread,
Jul 1, 2013, 11:02:14 AM7/1/13
to map...@googlegroups.com
Mapnik does not officially support virtualenv yet. You may be interested in following:


Dane


--
You received this message because you are subscribed to the Google Groups "mapnik" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapnik+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages