1

嗨,我正在尝试使用 Mahotas 来读取图像。我收到一条错误消息,提示“ValueError:mahotas.freeimage:无法确定文件图片.jpeg 的类型”。我尝试了几种图像和文件类型,包括 bmp 和 png。

import mahotas
picture = mahotas.imread('picture.jpeg') #line throws error

有人按照与我相同的教程在这里提出了这个问题,但没有找到解决方案。

  1. 我在 Mac OSx 10.9.4 上运行
  2. 我正在使用 Canopy 1.4.1
  3. 我使用 Homebrew 安装了 FreeImage 3.16.0

$ brew doctor如果有任何帮助,调用会返回以下警告:

Warning: Enthought Python was found in your PATH.
This can cause build problems, as this software installs its own
copies of iconv and libxml2 into directories that are picked up by
other build systems.

Warning: Python is installed at /Library/Frameworks/Python.framework
4

0 回答 0