Hello all, I'm new to this group and mahotas. I'm trying to install
mahotas using the instructions at
http://luispedro.org/software/mahotas
I've tried both the easy_install approach as well as the pip and both
fail with errors. Does anyone have any tips about how to get it to
successfully install? Below are the install results.
Thanks,
Jason
PIP
------------------
sudo pip install mahotas
Downloading/unpacking mahotas
Running setup.py egg_info for package mahotas
build_src
building extension "mahotas._histogram" sources
building extension "mahotas._convex" sources
building extension "mahotas._center_of_mass" sources
building extension "mahotas._morph" sources
building extension "mahotas._thin" sources
building extension "mahotas._bbox" sources
building extension "mahotas._distance" sources
building extension "mahotas._convolve" sources
building extension "mahotas._texture" sources
building extension "mahotas._labeled" sources
building extension "mahotas._lbp" sources
building extension "mahotas._surf" sources
building extension "mahotas._zernike" sources
building extension "mahotas._interpolate" sources
build_src: building npy-pkg config files
Installing collected packages: mahotas
Running setup.py install for mahotas
unifing config_cc, config, build_clib, build_ext, build commands --
compiler options
unifing config_fc, config, build_clib, build_ext, build commands --
fcompiler options
build_src
building extension "mahotas._histogram" sources
building extension "mahotas._convex" sources
building extension "mahotas._center_of_mass" sources
building extension "mahotas._morph" sources
building extension "mahotas._thin" sources
building extension "mahotas._bbox" sources
building extension "mahotas._distance" sources
building extension "mahotas._convolve" sources
building extension "mahotas._texture" sources
building extension "mahotas._labeled" sources
building extension "mahotas._lbp" sources
building extension "mahotas._surf" sources
building extension "mahotas._zernike" sources
building extension "mahotas._interpolate" sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'mahotas._histogram' extension
compiling C++ sources
C compiler: g++ -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -
O2 -Wall -fPIC
compile options: '-I/usr/lib/pymodules/python2.7/numpy/core/
include -I/usr/include/python2.7 -c'
g++: mahotas/_histogram.cpp
mahotas/_histogram.cpp:24:24: fatal error: Python.h: No such file
or directory
compilation terminated.
mahotas/_histogram.cpp:24:24: fatal error: Python.h: No such file
or directory
compilation terminated.
error: Command "g++ -pthread -fno-strict-aliasing -DNDEBUG -g -
fwrapv -O2 -Wall -fPIC -I/usr/lib/pymodules/python2.7/numpy/core/
include -I/usr/include/python2.7 -c mahotas/_histogram.cpp -o build/
temp.linux-x86_64-2.7/mahotas/_histogram.o" failed with exit status 1
Complete output from command /usr/bin/python -c "import
setuptools;__file__='/home/jason/build/mahotas/
setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'),
__file__, 'exec'))" install --single-version-externally-managed --
record /tmp/pip-mCKe7g-record/install-record.txt:
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --
compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --
fcompiler options
running build_src
build_src
building extension "mahotas._histogram" sources
building extension "mahotas._convex" sources
building extension "mahotas._center_of_mass" sources
building extension "mahotas._morph" sources
building extension "mahotas._thin" sources
building extension "mahotas._bbox" sources
building extension "mahotas._distance" sources
building extension "mahotas._convolve" sources
building extension "mahotas._texture" sources
building extension "mahotas._labeled" sources
building extension "mahotas._lbp" sources
building extension "mahotas._surf" sources
building extension "mahotas._zernike" sources
building extension "mahotas._interpolate" sources
build_src: building npy-pkg config files
running build_py
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'mahotas._histogram' extension
compiling C++ sources
C compiler: g++ -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -
Wall -fPIC
compile options: '-I/usr/lib/pymodules/python2.7/numpy/core/include -I/
usr/include/python2.7 -c'
g++: mahotas/_histogram.cpp
mahotas/_histogram.cpp:24:24: fatal error: Python.h: No such file or
directory
compilation terminated.
mahotas/_histogram.cpp:24:24: fatal error: Python.h: No such file or
directory
compilation terminated.
error: Command "g++ -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -
O2 -Wall -fPIC -I/usr/lib/pymodules/python2.7/numpy/core/include -I/
usr/include/python2.7 -c mahotas/_histogram.cpp -o build/temp.linux-
x86_64-2.7/mahotas/_histogram.o" failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/jason/
build/mahotas/setup.py';exec(compile(open(__file__).read().replace('\r
\n', '\n'), __file__, 'exec'))" install --single-version-externally-
managed --record /tmp/pip-mCKe7g-record/install-record.txt failed with
error code 1
Storing complete log in /home/jason/.pip/pip.log
easy_install
----------------------
sudo easy_install mahotas
Searching for mahotas
Reading
http://pypi.python.org/simple/mahotas/
Reading
http://luispedro.org/software/mahotas
Best match: mahotas 0.7.3
Downloading
http://pypi.python.org/packages/source/m/mahotas/mahotas-0.7.3.tar.gz#md5=468ab16252d53abf0167b7bf9ca514d6
Processing mahotas-0.7.3.tar.gz
Running mahotas-0.7.3/setup.py -q bdist_egg --dist-dir /tmp/
easy_install-7uSRM0/mahotas-0.7.3/egg-dist-tmp-vOTzT5
mahotas/_histogram.cpp:24:24: fatal error: Python.h: No such file or
directory
compilation terminated.
mahotas/_histogram.cpp:24:24: fatal error: Python.h: No such file or
directory
compilation terminated.
error: Setup script exited with error: Command "g++ -pthread -fno-
strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -I/usr/lib/
pymodules/python2.7/numpy/core/include -I/usr/include/python2.7 -c
mahotas/_histogram.cpp -o build/temp.linux-x86_64-2.7/mahotas/
_histogram.o" failed with exit status 1
/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py:251:
RuntimeWarning: Parent module 'numpy.distutils' not found while
handling absolute import
from numpy.distutils import log