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" <[email protected]> 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 > > [r...@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 > > [r...@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 > [email protected] > https://lists.berlios.de/mailman/listinfo/mapnik-users _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

