Mac OS is always a problematic operating system for me, it seems so
complicated. So, if you figure this out, please let me know what needs
to be changed and I'll include it in the next release.
Thanks
Luis
Best regards,
Michael
Building it with Apple's python works indeed, but it fails with Enthought's python environment, both with the 32-bit and the 64-bit environment!
That's a real pity, because Enthought is great for scientists who just don't want to know about library dependencies and just want a free scientific Python environment.
Guess I will post it in the Enthought dev group, let's see what they say.
Best regards,
Michael
I think I have fixed the C++ macro errors at compilation by putting the
Python.h include after the C++ includes.
It compiles fine now, but there is a remaining problem with Python not
finding the _bbox module when I try to import mahotas into iPython.
Maybe one of you know's what to fix?
I have sent Luis a pull request from my fork that is here:
https://github.com/michaelaye/mahotas
Hope we are close to closing this out! ;)
Best regards,
Michael
Carlos A. Silva wrote:
> Hi Jan,
>
> I did not considered that since I have been able to compile and install
> other python packages. As another person have posted I am also using
> EPD. I will try your suggestion.
>
> Thanks,
>
> Carlos Silva.
>
> On Wed, Mar 23, 2011 at 1:17 AM, Jan Erik Solem <jes...@gmail.com
> <mailto:jes...@gmail.com>> wrote:
>
> One more thing: Carlos, you have 10.5 in all the paths. Snow Leopard
> is 10.6.x. Could be a source of your problems. On my Snow Leopard I
> have two SDKs in that folder:
> "/Developer/SDKs/MacOSX10.5.sdk/..."
> "/Developer/SDKs/MacOSX10.6.sdk/..."
>
> Try the other one.
>
> /Jan Erik
>
> On Mar 22, 4:15 pm, Jan Erik Solem <jeso...@gmail.com
> <mailto:jeso...@gmail.com>> wrote:
> > Building from sourcehttp://www.github.com/luispedro/mahotasworks
> <http://www.github.com/luispedro/mahotasworks>
> > fine (Mac OS X 10.6.6). Download and then run:
> >
> > sudo python setup.py install
> >
> > cheers,
> > /Jan Erik
> >
> > On Mar 10, 9:38 am, "K.-Michael Aye" <kmichael....@googlemail.com
> <mailto:kmichael....@googlemail.com>>
> > > >> locale_facets.h:256: error: �__c� was not declared in this scope
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h: At global scope:
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h:796: error: �btowc� is not a type
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h:813: error: expected �;� before �const�
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h:828: error: expected `;' before �char_type�
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h:829: error: �btowc� is not a type
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h:846: error: expected �;� before �const�
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h:865: error: expected `;' before �char_type�
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h: In member function �char
> > > >> std::ctype<char>::towupper(int (*)(char)) const�:
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h:797: error: �__c� was not declared in this scope
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h: In member function �char
> > > >> std::ctype<char>::towlower(int (*)(char)) const�:
> >
> > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > >> locale_facets.h:830: error: �__c� was not declared in this scope
> Campus de Azur�m
> 4800 - 058 Guimar�es
I can't believe it was this simple in the end.
(I'll pull from your branch).
Tx
Luis
> > > > >> locale_facets.h:256: error: ‘__c’ was not declared in this
> > > > >> scope
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h: At global scope:
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h:796: error: ‘btowc’ is not a type
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h:813: error: expected ‘;’ before ‘const’
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h:828: error: expected `;' before ‘char_type’
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h:829: error: ‘btowc’ is not a type
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h:846: error: expected ‘;’ before ‘const’
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h:865: error: expected `;' before ‘char_type’
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h: In member function ‘char
> > > > >> std::ctype<char>::towupper(int (*)(char)) const’:
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h:797: error: ‘__c’ was not declared in this
> > > > >> scope
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h: In member function ‘char
> > > > >> std::ctype<char>::towlower(int (*)(char)) const’:
> > > > >>
> > > > >> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/
> > > > >> locale_facets.h:830: error: ‘__c’ was not declared in this
> > Campus de Azurém
> > 4800 - 058 Guimarães
That's probably because you forgot to build it in development mode.
Try 'python setup.py test' (this only works on fairly current master, but the
most current is yours—which I just merged).
Tx
Luis
Luis Pedro Coelho wrote:
> On Saturday, March 26, 2011 03:41:59 pm K.-Michael Aye wrote:
>> It compiles fine now, but there is a remaining problem with Python not
>> finding the _bbox module when I try to import mahotas into iPython.
>> Maybe one of you know's what to fix?
>
> That's probably because you forgot to build it in development mode.
>
If that's a requirement, it should be mentioned in the INSTALL readme, no?
> Try 'python setup.py test' (this only works on fairly current master, but the
> most current is yours—which I just merged).
>
Tried that, then it complained about freeimage missing.
Is there a proprietary problem with just using PIL? Or does PIL support
less formats?
So, after I installed freeimage on the Mac, the 'test' still could not
find the library, even so I had this in my /usr/local/lib:
libfreeimage.a
libfreeimage-3.15.0.dylib
libfreeimage.3.dylib -> libfreeimage-3.15.0.dylib
available.
I then added a symlink:
libfreeimage.dylib -> libfreeimage.3.dylib
and the start started to execute but crashed:
>> mahotas.tests.test_freeimage.test_freeimage ... Segmentation fault
Any idea? Does it run for you?
Installation and importing mahotas in a Python session works now though. ;)
Best regards,
Michael