[Mapnik-users] The mapnik library and python bindings must have been compiled and installed successfully before running this script

Dane Springmeyer blake at hailmail.net
Wed Apr 7 21:30:44 CEST 2010


This should get things working with Python 24 again:

http://trac.mapnik.org/changeset/1759

Thanks Prashant for catching this, which affected trunk after r1744.

Dane

On Apr 7, 2010, at 11:17 AM, Terry Laurenzo wrote:

> You are running Python 2.4, which does not include support for  
> conditional
> expressions (which is the syntax error you are getting).  I believe  
> this was
> added in Python 2.5.
>
> Terry Laurenzo
> MapQuest
>
> On 4/7/10 12:11 PM, "Prashant N" <massoo at gmail.com> wrote:
>
>> hi,
>>
>> I was able to build mapnik2 properly however when i try to run the
>> demo from the /path/to/mapnik2-source/demp/python i get
>>
>> [root at localhost mapnik2/demo/python]# python rundemo.py
>>
>> "The mapnik library and python bindings must have been compiled and
>> installed successfully before running this script"
>>
>> When I try to import mapnik or mapnik2 i get
>>
>> [root at localhost python]# python
>> Python 2.4.3 (#1, Sep  3 2009, 15:37:12)
>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
>> Type "help", "copyright", "credits" or "license" for more  
>> information.
>>>>> import mapnik
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in ?
>> ImportError: No module named mapnik
>>
>>>>> import mapnik2
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in ?
>>  File "/usr/lib/python2.4/site-packages/mapnik2/__init__.py", line  
>> 321
>>    symbol = symbol_for_cls if name=='Symbolizer' else  
>> symbol_for_subcls
>>                             ^
>> SyntaxError: invalid syntax
>>>>>
>>
>> The configure & install can be looked at http://dpaste.com/180527/ .
>> Also I ran ldconfig post to installation
>>
>> --
>> Thanks & Regards
>> Prashant N
>> http://openenter.blogspot.com
>> _______________________________________________
>> Mapnik-users mailing list
>> Mapnik-users at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/mapnik-users
>
> _______________________________________________
> Mapnik-users mailing list
> Mapnik-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/mapnik-users




More information about the Mapnik-users mailing list