Hi Claire,

I too find that default installation location for mapnik curious. I'm  
not sure whether is is due to the scons build process for darwin or  
something with apple's python setup.

Either way on 10.5 (which I am running as well), that site-packages  
directory buried in the frameworks is not on my default path.

To be able to import mapnik you'll either need to say:

export PYTHONPATH= /System/Library/Frameworks/Python.framework/ 
Versions/2.5/lib/python2.5/site-packages/
(and tuck that in your ~/.bash_profile)

or perhaps more cleanly, create a symlink from a site-packages  
directory that is on your PYTHONPATH.

For me this works:

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.5/ 
lib/python2.5/site-packages/mapnik /Library/Python/2.5/site-packages/ 
mapnik

since /Library/Python/2.5/site-packages/ is on my PYTHONPATH

or drag the mapnik folder to a location on your pythonpath while  
holding option-command

Hope that gets you going,

Dane

On Apr 17, 2008, at 11:59 AM, Claire McLister wrote:

> Thanks, Ken-ichi. Good to know someone else is in the same boat:-)
>
> I tried your suggestions, and it seems that the versions of Python are
> lined up properly. I do have another version of Python installed in /
> opt, but I don't think that is conflicting here.
>
> Will continue to investigate.
>
> What issues are you facing?
>
> Claire
>
> On Apr 17, 2008, at 11:49 AM, Ken-ichi wrote:
>
>> Hi Claire,
>>
>> I'm still struggling to get mapnik installed myself, but here are
>> somethings you can try:
>>
>> - check when version of python you're running with
>>
>> which python
>>
>> and make sure that's the same framework python for which you
>> installed mapnik.
>>
>>
>> - in your mapnik src dir, try
>>
>> python scons/scons.py -h
>>
>> with whatever flags you initially used to compile and make sure that
>> all the paths line up with what you might expect.  It's possible you
>> have another copy of python installed on your system (e.g. the
>> MacPorts version), and mapnik installed itself there instead of where
>> you think.
>>
>> Hope that helps a little.
>>
>>
>> -Ken-ichi
>>
>>
>>
>> On Thu, Apr 17, 2008 at 10:35 AM, Claire McLister
>> <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> I just managed to get mapnik compiled and installed on Mac OS X.
>>>
>>> When I invoke python and try to import mapnik, I get the following
>>> error:
>>>
>>> Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:16)
>>> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
>>> Type "help", "copyright", "credits" or "license" for more
>>> information.
>>>>>> from mapnik import *
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in <module>
>>> ImportError: No module named mapnik
>>>>>>
>>>
>>> If I look under the site-packages directory for python, mapnik.so
>>> seems to be there:
>>>
>>> [zeemac:site-packages]$ ls -l /System/Library/Frameworks/
>>> Python.framework/Versions/2.5/lib/python2.5/site-packages/mapnik/
>>> total 5248
>>> -rw-r--r--   1 root  wheel     2911 Sep 25  2007 __init__.py
>>> -rwxr-xr-x   1 root  wheel  2675520 Apr 17 10:04 _mapnik.so*
>>> drwxr-xr-x  11 root  wheel      374 Apr 17 10:09 ogcserver/
>>> -rw-r--r--   1 root  wheel      132 Apr 17 10:09 paths.py
>>> [zeemac:site-packages]$
>>>
>>> Can someone please point me in the right direction?
>>>
>>> Thanks
>>>
>>> Claire
>>>
>>> --
>>> Claire McLister                        [EMAIL PROTECTED]
>>> 21060 Homestead Road Suite 150
>>> Cupertino, CA 95014            408-733-2737(fax)
>>>
>>>                     http://www.zeemaps.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

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

Reply via email to