software install

3 replies [Last post]
autophagy
User offline. Last seen 6 years 38 weeks ago. Offline
Joined: 07/03/2011

when trying to install a python module mahotas, in the shell, by getting into the directory, and then use the command:

sudo python setup.py install

everything seems going well, until errors:

c++: mahotas/_histogram.cpp
sh: c++: command not found
sh: c++: command not found
error: Command "c++ -fno-strict-aliasing -fno-common -dynamic -arch ppc -arch i386 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c mahotas/_histogram.cpp -o build/temp.macosx-10.3-fat-2.7/mahotas/_histogram.o" failed with exit status 127

anybody have ideas about this?

Thank you very much

pcfb
User offline. Last seen 4 days 22 hours ago. Offline
Joined: 08/04/2010
Installation errors.

Hi. Do you have the developer tools installed? ( Does which gcc give anything?)
What operating system are you using?
It seems like that command should be g++ instead of c++ but before you try that (editing setup.py) make sure you have the Dev Tools.

autophagy
User offline. Last seen 6 years 38 weeks ago. Offline
Joined: 07/03/2011
installation errors

Hi, it is under Mac OS X system, yeah at first it is because I didn't install gcc, and then Xcode 3 were installed from developer tool site of Apple. testing 'which gcc', it feedback '/usr/bin/gcc', seems normal.

tried again with 'sudo python setup.py install' again, it gave back error status 1:

error: stdarg.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccOxiCqF.out
In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,
from mahotas/_histogram.cpp:24:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,
from mahotas/_histogram.cpp:24:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccOxiCqF.out
error: Command "c++ -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c mahotas/_histogram.cpp -o build/temp.macosx-10.3-fat-2.7/mahotas/_histogram.o" failed with exit status 1

Any ideas with this?

Thank you very much

pcfb
User offline. Last seen 4 days 22 hours ago. Offline
Joined: 08/04/2010
Installation errors.

Which version of OSX?
Can you get Xcode 4?

What does it say is you type:
ls -l /usr/bin/gcc*
(Do you see gcc-4.0 listed as well as gcc-4.2
There might be a work around of typing
CC=/usr/bin/gcc-4.0 sudo python setup.py install
but it will depend on your system.

You can also try installing easy_install with the setuptools at http://pypi.python.org/pypi/setuptools....