Ken,

When you installed boost from macports did you specify the python  
variant?

I missed this at first, and I found it is needed on leopard at least.   
So, you may benefit from uninstalling, cleaning, and reinstalling  
boost with variant python25 (and if you are installing from svn then  
icu as well)

Try typing:
$port info boost

and you should get:
----

boost 1.34.1, Revision 2, devel/boost (Variants: universal, darwin_9,  
darwin, python24, python25, icu)
http://www.boost.org

Boost provides free portable peer-reviewed C++ libraries. The emphasis  
is on portable libraries which work well with the C++ Standard Library.

Build Dependencies: boost-jam, gmake
Platforms: darwin
Maintainers: [EMAIL PROTECTED]

---

then:
sudo port uninstall boost-jam boost
sudo port clean boost-jam boost
sudo port install boost-jam
sudo port install -v boost +python25 +icu


Cheers,

Dane


On Feb 29, 2008, at 9:42 AM, Ken-ichi wrote:

> Thanks for the reply, Artem.  Here's what happened when I ran the
> commands you recommended in the regular Python interactive
> interpreter:
>
>>>> from mapnik import *
>>>>
>>>> p = Projection("+init=epsg:3309")
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> TypeError: __init__() should return None, not 'NoneType'
>>>> p.forward(Coord(-1.25,51.75))
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> NameError: name 'p' is not defined
>>>> m = Map(600,300,"+proj=latlong +datum=WGS84")
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> TypeError: __init__() should return None, not 'NoneType'
>
>
> Also, I'm not sure if it makes any difference, but I installed boost
> and all the other dependencies with MacPorts.  Also, here's my gcc
> version info:
>
> Target: i686-apple-darwin8
> Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure
> --disable-checking -enable-werror --prefix=/usr --mandir=/share/man
> --enable-languages=c,objc,c++,obj-c++
> --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
> --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
> --build=powerpc-apple-darwin8 --with-arch=nocona --with-tune=generic
> --program-prefix= --host=i686-apple-darwin8
> --target=i686-apple-darwin8
> Thread model: posix
>
> -Ken-ichi
>
>
> On Fri, Feb 29, 2008 at 1:29 AM, Artem Pavlenko <[EMAIL PROTECTED]>  
> wrote:
>>
>>
>>> Hi all,
>>>
>>> Just wanted to poke around with Mapnik 0.5 a bit, but I'm having
>>> problems getting it set up under Max OS 10.4.11, Python 2.5.1, and
>>> Boost 1.34.
>>
>> I'm using the same setup.
>>
>>
>>> I run scons.py to build and again to install and
>>> everything seems to run fine, all the files seem to end up in the
>>> right places, but here's what happens when I try the Projection
>>> examples in the installation instructions in iPython (replacing the
>>> EPSG code with something I actually had in my share/proj/epsg file):
>>>
>>> In [1]: from mapnik import Projection
>>>
>>> In [2]: p = Projection(['init=epsg:3309'])
>>
>>
>> The above has been deprecated.
>>> ----------------------------------------------------------------------
>>
>>> -----
>>> <class 'Boost.Python.ArgumentError'>      Traceback (most recent
>>> call last)
>>>
>>> /Users/kueda/<ipython console> in <module>()
>>>
>>> <class 'Boost.Python.ArgumentError'>: Python argument types in
>>>    Projection.__init__(Projection, list)
>>> did not match C++ signature:
>>>    __init__(_object*)
>>>    __init__(_object*, std::string)
>>>
>>
>>
>>
>>
>>>
>>>
>>> So that looked like it was expecting a string and not a list, so I
>>> tried this:
>>>
>>> In [3]: p = Projection('init=epsg:3309')
>>> ----------------------------------------------------------------------
>>> -----
>>> <type 'exceptions.RuntimeError'>          Traceback (most recent
>>> call last)
>>>
>>> /opt/local/src/mapnik-trunk/tests/<ipython console> in <module>()
>>>
>>> <type 'exceptions.RuntimeError'>: failed to initialize projection
>>> with:init=epsg:3309
>>>
>>>
>>
>>
>> Ok, try :
>>
>> from mapnik import *
>>
>> p = Projection("+init=epsg:3309")
>> p.forward(Coord(-1.25,51.75))
>>
>> projections strings are in proj4_init_plus format.
>>
>>
>>>
>>> Any idea what's going on here?  I also had trouble with the
>>> GettingStarted tutorial:
>>>
>>> In [5]: from mapnik import *
>>>
>>> In [6]: m = Map(600,300,"+proj=latlong +datum=WGS84")
>>> ----------------------------------------------------------------------
>>> -----
>>> <type 'exceptions.TypeError'>             Traceback (most recent
>>> call last)
>>>
>>> /Users/kueda/<ipython console> in <module>()
>>>
>>> <type 'exceptions.TypeError'>: __init__() should return None, not
>>> 'NoneType'
>>
>> The above works for me.  Could you try running the same not from
>> iPython console ?
>>
>> Artem
>>
>>>
>>>
>>>
>>> Any help would be appreciated, and apologies in advance if I'm  
>>> asking
>>> a question that's already been answered a billion times (I sifted
>>> through the list archives and didn't see anything).
>>>
>>>
>>> -Ken-ichi
>>> _______________________________________________
>>> 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