Run in Python3
In [1]:
import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from sklearn.utils import shuffle
import mahotas as mh
original_img = np.array(mh.imread('data/sample2.jpg'),dtype=np.float64)/255
original_demensions = tuple(original_img.shape)
width, height, depth = tuple(original_img.shape)
image_flattened = np.reshape(original_img,(width * height, depth))
image_array_sample = shuffle(image_flattened, random_state=0)[:1000]
estimator = KMeans(n_clusters=64, random_state=0)
estimator.fit(image_array_sample)
cluster_assignments = estimator.predict(image_flattened)
compressed_palette = estimator.cluster_centers_
compressed_img = np.zeros((width,height,compressed_palette.shape[1]))
label_idx = 0
for i in range(width):
for j in range(height):
compressed_img[i][j] = compressed_palette[cluster_assignments[label_idx]]
label_idx += 1
plt.subplot(122)
plt.title('Original Image')
plt.imshow(original_img)
plt.axis('off')
plt.subplot(121)
plt.title('compressed Image')
plt.imshow(compressed_img)
plt.axis('off')
plt.show()
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-2104dc33f402> in <module>()
3 from sklearn.cluster import KMeans
4 from sklearn.utils import shuffle
----> 5 import mahotas as mh
6
7 original_img = np.array(mh.imread('data/sample2.jpg'),dtype=np.float64)/255
ImportError: No module named 'mahotas'
In [2]:
!pip install mahotas
Collecting mahotas
Using cached mahotas-1.4.3.tar.gz
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from mahotas)
Building wheels for collected packages: mahotas
Running setup.py bdist_wheel for mahotas ... - error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jlgrlC/mahotas/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpOJ_IOrpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/mahotas
copying mahotas/texture.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/freeimage.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/thresholding.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/lbp.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/thin.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/distance.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/polygon.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/interpolate.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/edge.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/histogram.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/euler.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/labeled.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/resize.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/tas.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/__init__.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/moments.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/bwperim.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/bbox.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/surf.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/zernike.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/mahotas_version.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/center_of_mass.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/_filters.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/stretch.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/internal.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/colors.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/segmentation.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/morph.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/convolve.py -> build/lib.linux-x86_64-2.7/mahotas
creating build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_demos.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/utils.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_texture.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_colors.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_edge.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_stretch.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_label.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_close_holes.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_features_shape.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_internal.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_bbox.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_thresholding.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_find.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_interpolate.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_citation.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/__init__.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_template_match.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_io.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_mean_filter.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_segmentation.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_filters.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_zernike.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_imresize.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_median_filter.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_surf_regression.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_convolve.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/pymorph_copy.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_dilate_erode.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_freeimage.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_mahotas.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_euler.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_thin.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_morph.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_tas.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_gvoronoi.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_center_of_mass.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_hitmiss.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_lbp.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_watershed.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_majority.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_surf.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_bwperim.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_distance.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_moments.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_labeled.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_polygon.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_histogram.py -> build/lib.linux-x86_64-2.7/mahotas/tests
creating build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/texture.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/lbp.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/tas.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/__init__.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/moments.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/surf.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/zernike.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/shape.py -> build/lib.linux-x86_64-2.7/mahotas/features
creating build/lib.linux-x86_64-2.7/mahotas/io
copying mahotas/io/freeimage.py -> build/lib.linux-x86_64-2.7/mahotas/io
copying mahotas/io/pil.py -> build/lib.linux-x86_64-2.7/mahotas/io
copying mahotas/io/__init__.py -> build/lib.linux-x86_64-2.7/mahotas/io
creating build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/thresholding.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/wally.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/distance.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/morphology.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/surf_gaussians.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/__init__.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/surf_luispedro.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/nuclear.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/nuclear_distance_watershed.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/superpixels.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/wavelet_compress.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/edge_demo.py -> build/lib.linux-x86_64-2.7/mahotas/demos
creating build/lib.linux-x86_64-2.7/mahotas/tests/data
copying mahotas/tests/data/luispedro.npy -> build/lib.linux-x86_64-2.7/mahotas/tests/data
copying mahotas/tests/data/determinant_zero.png -> build/lib.linux-x86_64-2.7/mahotas/tests/data
copying mahotas/tests/data/rgba.png -> build/lib.linux-x86_64-2.7/mahotas/tests/data
copying mahotas/tests/data/1bpp.bmp -> build/lib.linux-x86_64-2.7/mahotas/tests/data
creating build/lib.linux-x86_64-2.7/mahotas/demos/data
copying mahotas/demos/data/luispedro.jpg -> build/lib.linux-x86_64-2.7/mahotas/demos/data
copying mahotas/demos/data/nuclear.png -> build/lib.linux-x86_64-2.7/mahotas/demos/data
copying mahotas/demos/data/lena.jpg -> build/lib.linux-x86_64-2.7/mahotas/demos/data
copying mahotas/demos/data/DepartmentStore.jpg -> build/lib.linux-x86_64-2.7/mahotas/demos/data
running build_ext
building 'mahotas._histogram' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/mahotas
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -DPY_ARRAY_UNIQUE_SYMBOL=Mahotas_PyArray_API_Symbol -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c mahotas/_histogram.cpp -o build/temp.linux-x86_64-2.7/mahotas/_histogram.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for mahotas
Running setup.py clean for mahotas
Failed to build mahotas
Installing collected packages: mahotas
Running setup.py install for mahotas ... - error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jlgrlC/mahotas/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-oxDED7-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/mahotas
copying mahotas/texture.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/freeimage.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/thresholding.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/lbp.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/thin.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/distance.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/polygon.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/interpolate.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/edge.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/histogram.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/euler.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/labeled.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/resize.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/tas.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/__init__.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/moments.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/bwperim.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/bbox.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/surf.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/zernike.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/mahotas_version.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/center_of_mass.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/_filters.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/stretch.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/internal.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/colors.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/segmentation.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/morph.py -> build/lib.linux-x86_64-2.7/mahotas
copying mahotas/convolve.py -> build/lib.linux-x86_64-2.7/mahotas
creating build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_demos.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/utils.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_texture.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_colors.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_edge.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_stretch.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_label.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_close_holes.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_features_shape.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_internal.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_bbox.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_thresholding.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_find.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_interpolate.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_citation.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/__init__.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_template_match.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_io.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_mean_filter.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_segmentation.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_filters.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_zernike.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_imresize.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_median_filter.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_surf_regression.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_convolve.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/pymorph_copy.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_dilate_erode.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_freeimage.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_mahotas.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_euler.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_thin.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_morph.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_tas.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_gvoronoi.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_center_of_mass.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_hitmiss.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_lbp.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_watershed.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_majority.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_surf.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_bwperim.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_distance.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_moments.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_labeled.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_polygon.py -> build/lib.linux-x86_64-2.7/mahotas/tests
copying mahotas/tests/test_histogram.py -> build/lib.linux-x86_64-2.7/mahotas/tests
creating build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/texture.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/lbp.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/tas.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/__init__.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/moments.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/surf.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/zernike.py -> build/lib.linux-x86_64-2.7/mahotas/features
copying mahotas/features/shape.py -> build/lib.linux-x86_64-2.7/mahotas/features
creating build/lib.linux-x86_64-2.7/mahotas/io
copying mahotas/io/freeimage.py -> build/lib.linux-x86_64-2.7/mahotas/io
copying mahotas/io/pil.py -> build/lib.linux-x86_64-2.7/mahotas/io
copying mahotas/io/__init__.py -> build/lib.linux-x86_64-2.7/mahotas/io
creating build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/thresholding.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/wally.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/distance.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/morphology.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/surf_gaussians.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/__init__.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/surf_luispedro.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/nuclear.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/nuclear_distance_watershed.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/superpixels.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/wavelet_compress.py -> build/lib.linux-x86_64-2.7/mahotas/demos
copying mahotas/demos/edge_demo.py -> build/lib.linux-x86_64-2.7/mahotas/demos
creating build/lib.linux-x86_64-2.7/mahotas/tests/data
copying mahotas/tests/data/luispedro.npy -> build/lib.linux-x86_64-2.7/mahotas/tests/data
copying mahotas/tests/data/determinant_zero.png -> build/lib.linux-x86_64-2.7/mahotas/tests/data
copying mahotas/tests/data/rgba.png -> build/lib.linux-x86_64-2.7/mahotas/tests/data
copying mahotas/tests/data/1bpp.bmp -> build/lib.linux-x86_64-2.7/mahotas/tests/data
creating build/lib.linux-x86_64-2.7/mahotas/demos/data
copying mahotas/demos/data/luispedro.jpg -> build/lib.linux-x86_64-2.7/mahotas/demos/data
copying mahotas/demos/data/nuclear.png -> build/lib.linux-x86_64-2.7/mahotas/demos/data
copying mahotas/demos/data/lena.jpg -> build/lib.linux-x86_64-2.7/mahotas/demos/data
copying mahotas/demos/data/DepartmentStore.jpg -> build/lib.linux-x86_64-2.7/mahotas/demos/data
running build_ext
building 'mahotas._histogram' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/mahotas
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -DPY_ARRAY_UNIQUE_SYMBOL=Mahotas_PyArray_API_Symbol -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c mahotas/_histogram.cpp -o build/temp.linux-x86_64-2.7/mahotas/_histogram.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jlgrlC/mahotas/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-oxDED7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-jlgrlC/mahotas/
In [ ]:
Content source: moonbury/pythonanywhere
Similar notebooks: