由于错误的Python位置,libvips无法安装

时间:2014-10-04 18:32:09

标签: python osx-mavericks homebrew

我尝试通过Brew安装libvips,但是当我安装时,我得到关于Python不在正确位置的错误。

错误消息

martins-mbp:~ martinnielsen$ brew install vips

==> Downloading http://www.vips.ecs.soton.ac.uk/supported/7.40/vips-7.40.10.tar.Already    downloaded: /Library/Caches/Homebrew/vips-7.40.10.tar.gz
==> ./configure --prefix=/usr/local/Cellar/vips/7.40.10
==> make check
/usr/local/Cellar/gobject-introspection/1.42.0/bin/g-ir-scanner  --add-include-path=. --namespace=Vips --nsversion=8.0 --libtool="/bin/sh ../libtool"  --include=GObject-2.0   --library=libvips.la --warn-all --verbose --identifier-prefix=Vips --identifier-prefix=vips --symbol-prefix=vips --symbol-prefix=im --symbol-prefix=im_  --cflags-begin  -I../libvips/include --cflags-end  arithmetic/abs.c arithmetic/add.c arithmetic/arithmetic.c arithmetic/avg.c arithmetic/binary.c arithmetic/boolean.c arithmetic/complex.c arithmetic/deviate.c arithmetic/divide.c arithmetic/getpoint.c arithmetic/hist_find.c arithmetic/hist_find_indexed.c arithmetic/hist_find_ndim.c arithmetic/hough.c arithmetic/hough_circle.c arithmetic/hough_line.c arithmetic/invert.c arithmetic/linear.c arithmetic/math.c arithmetic/math2.c arithmetic/max.c arithmetic/measure.c arithmetic/min.c arithmetic/multiply.c arithmetic/nary.c arithmetic/profile.c arithmetic/project.c arithmetic/relational.c arithmetic/remainder.c arithmetic/round.c arithmetic/sign.c arithmetic/statistic.c arithmetic/stats.c arithmetic/subtract.c arithmetic/sum.c arithmetic/unary.c arithmetic/unaryconst.c cimg/cimg_dispatch.c colour/colour.c colour/colourspace.c colour/dE00.c colour/dE76.c colour/dECMC.c colour/float2rad.c colour/icc_transform.c colour/Lab2LabQ.c colour/Lab2LabS.c colour/Lab2LCh.c colour/Lab2XYZ.c colour/LabQ2Lab.c colour/LabQ2LabS.c colour/LabQ2sRGB.c colour/LabS2Lab.c colour/LabS2LabQ.c colour/LCh2Lab.c colour/LCh2UCS.c colour/rad2float.c colour/scRGB2sRGB.c colour/scRGB2XYZ.c colour/sRGB2scRGB.c colour/UCS2LCh.c colour/XYZ2Lab.c colour/XYZ2scRGB.c colour/XYZ2Yxy.c colour/Yxy2XYZ.c conversion/bandary.c conversion/bandbool.c conversion/bandjoin.c conversion/bandmean.c conversion/bandrank.c conversion/cache.c conversion/cast.c conversion/conversion.c conversion/copy.c conversion/embed.c conversion/extract.c conversion/falsecolour.c conversion/flatten.c conversion/flip.c conversion/gamma.c conversion/grid.c conversion/ifthenelse.c conversion/insert.c conversion/join.c conversion/msb.c conversion/recomb.c conversion/replicate.c conversion/rot.c conversion/rot45.c conversion/scale.c conversion/sequential.c conversion/subsample.c conversion/tilecache.c conversion/wrap.c conversion/zoom.c convolution/compass.c convolution/conv.c convolution/convolution.c convolution/convsep.c convolution/correlation.c convolution/fastcor.c convolution/gaussblur.c convolution/im_aconv.c convolution/im_aconvsep.c convolution/im_conv.c convolution/im_conv_f.c convolution/sharpen.c convolution/spcor.c create/black.c create/buildlut.c create/create.c create/eye.c create/fractsurf.c create/gaussmat.c create/gaussnoise.c create/grey.c create/identity.c create/im_benchmark.c create/invertlut.c create/logmat.c create/mask.c create/mask_butterworth.c create/mask_butterworth_band.c create/mask_butterworth_ring.c create/mask_fractal.c create/mask_gaussian.c create/mask_gaussian_band.c create/mask_gaussian_ring.c create/mask_ideal.c create/mask_ideal_band.c create/mask_ideal_ring.c create/other_dispatch.c create/point.c create/sines.c create/text.c create/tonelut.c create/xyz.c create/zone.c draw/draw.c draw/draw_circle.c draw/draw_flood.c draw/draw_image.c draw/draw_line.c draw/draw_mask.c draw/draw_rect.c draw/draw_smudge.c draw/drawink.c foreign/analyze2vips.c foreign/analyzeload.c foreign/csv.c foreign/csvload.c foreign/csvsave.c foreign/dzsave.c foreign/fits.c foreign/fitsload.c foreign/fitssave.c foreign/foreign.c foreign/jpeg2vips.c foreign/jpegload.c foreign/jpegsave.c foreign/magick2vips.c foreign/magickload.c foreign/matlab.c foreign/matload.c foreign/matrixload.c foreign/matrixsave.c foreign/openexr2vips.c foreign/openexrload.c foreign/openslide2vips.c foreign/openslideload.c foreign/pngload.c foreign/pngsave.c foreign/ppm.c foreign/ppmload.c foreign/ppmsave.c foreign/radiance.c foreign/radload.c foreign/radsave.c foreign/rawload.c foreign/rawsave.c foreign/tiff2vips.c foreign/tiffload.c foreign/tiffsave.c foreign/vips2jpeg.c foreign/vips2tiff.c foreign/vips2webp.c foreign/vipsload.c foreign/vipspng.c foreign/vipssave.c foreign/webp2vips.c foreign/webpload.c foreign/webpsave.c freqfilt/freqfilt.c freqfilt/freqmult.c freqfilt/fwfft.c freqfilt/invfft.c freqfilt/phasecor.c freqfilt/spectrum.c histogram/hist_cum.c histogram/hist_equal.c histogram/hist_ismonotonic.c histogram/hist_local.c histogram/hist_match.c histogram/hist_norm.c histogram/hist_plot.c histogram/hist_unary.c histogram/histogram.c histogram/maplut.c histogram/percent.c histogram/stdif.c iofuncs/base64.c iofuncs/buf.c iofuncs/buffer.c iofuncs/cache.c iofuncs/enumtypes.c iofuncs/error.c iofuncs/gate.c iofuncs/generate.c iofuncs/header.c iofuncs/image.c iofuncs/init.c iofuncs/mapfile.c iofuncs/memory.c iofuncs/object.c iofuncs/operation.c iofuncs/rect.c iofuncs/region.c iofuncs/semaphore.c iofuncs/sink.c iofuncs/sinkdisc.c iofuncs/sinkmemory.c iofuncs/sinkscreen.c iofuncs/system.c iofuncs/threadpool.c iofuncs/type.c iofuncs/util.c iofuncs/vector.c iofuncs/vips.c iofuncs/vipsmarshal.c iofuncs/window.c morphology/countlines.c morphology/hitmiss.c morphology/labelregions.c morphology/morph.c morphology/morphology.c morphology/rank.c mosaicing/global_balance.c mosaicing/im_avgdxdy.c mosaicing/im_chkpair.c mosaicing/im_clinear.c mosaicing/im_improve.c mosaicing/im_initialize.c mosaicing/im_lrcalcon.c mosaicing/im_lrmerge.c mosaicing/im_lrmosaic.c mosaicing/im_remosaic.c mosaicing/im_tbcalcon.c mosaicing/im_tbmerge.c mosaicing/im_tbmosaic.c mosaicing/match.c mosaicing/merge.c mosaicing/mosaic.c mosaicing/mosaic1.c mosaicing/mosaicing.c resample/affine.c resample/interpolate.c resample/quadratic.c resample/resample.c resample/shrink.c resample/similarity.c resample/transform.c video/im_video_test.c video/video_dispatch.c include/vips/basic.h include/vips/vips.h include/vips/object.h include/vips/image.h include/vips/error.h include/vips/foreign.h include/vips/interpolate.h include/vips/header.h include/vips/operation.h include/vips/enumtypes.h include/vips/arithmetic.h include/vips/conversion.h include/vips/type.h libvips.la --output Vips-8.0.gir
/bin/sh: /usr/local/Cellar/gobject-introspection/1.42.0/bin/g-ir-scanner:     

/usr/local/opt/python/bin/python: bad interpreter: No such file or directory

make[2]: *** [Vips-8.0.gir] Error 126
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew): https://github.com/homebrew/homebrew-science/issues

我查找了文件夹/usr/local/opt/python/bin/python,但我没有。

如果我在终端中which Python我得到/usr/bin/Python,我猜应该是脚本应该寻找Python的地方。

我可以以某种方式为正确的文件夹设置别名以允许构建libvips吗?

1 个答案:

答案 0 :(得分:2)

我通过自制软件安装python修复了错误。

所以我先做homebrew install python,然后再做brew install homebrew/science/vips --with-webp --with-graphicsmagick