Espen,

You are hitting a problem with the python bindings based on how they are 
packaged.

It should be able to be solved with this odd hack:

    sudo cp /usr/lib/pyshared/python2.6/mapnik2/* 
/usr/lib/pymodules/python2.7/mapnik2/

If not let us know.

For background on the issue see: 
https://github.com/mapnik/mapnik-packaging/issues/3

Also: note this has nothing to do with TileMill, just an issue with the mapnik 
nightly ppa scripts
properly handling multiple python versions on ubuntu.

Dane


On Oct 27, 2011, at 4:52 AM, Espen Isaksen wrote:

> Hi!
> 
> I am guessing I am doing something really stupid :-)
> 
> I have installed mapnik2 through Tilemill on Ubuntu. I start a python
> shell and run the following commands in the shell(no file called
> mapnik.py as others having the same problem):
> 
> import mapnik2 as mapnik
> mapfile = 'kart.xml'
> map_output = 'hello_world_using_xml_config.png'
> m = mapnik.Map(600, 300)
> 
> and then I end up with this:
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'Map'
> 
> 
> Can anybody pinpoint to me what I am doing wrong here?
> 
> Espen
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users

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

Reply via email to