认为 mahotas.imread 找不到 freeimage

标签 enthought freeimage mahotas

我是 python 新手,建议我使用 Canopy。我正在尝试跟随with this tutorial ,但我陷入了 mahotas.imread 行。我收到一条错误消息,指出此内容结束:

Full error was: mahotas.freeimage: could not find libFreeImage in any of the following directories: '/Users/RJD/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/mahotas', '/lib', '/usr/lib', '/usr/local/lib', '/opt/local/lib'

我已经通过包管理器添加了 mahotas 包,但没有效果。还尝试了步骤here ,没有不同的结果。

我实际上能够在“/Users/RJD/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/mahotas”中找到“freeimage.py”和“freeimage.pyc”。我该如何告诉 Canopy 它在那里?!

任何帮助将不胜感激。

干杯,

最佳答案

这里是 mahotas 的作者:

Mahotas 本身不具备读取图像的功能。 imread 只是 3 个后端之一的包装器:

  1. mahotas-imread(即 https://pypi.python.org/pypi/imread )
  2. FreeImage(这是原始版本,如果您有这么旧的版本 [0.7.1 是 12 年 1 月的版本],它可能仍然只支持 FreeImage)
  3. matplotlib(仅支持 PNG 和 JPEG)

因此,您需要安装上面的软件包之一。

关于认为 mahotas.imread 找不到 freeimage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18296113/

相关文章:

python - 嵌套 HasTraits 对象的 View

c# - 使用 FreeImage 库 (C#) 减少 PNG-8 调色板中的颜色计数

c++ - 使用 Visual Studio Express 2013 构建和链接 FreeImage

python - 使用 Mahotas 读写图像

Python Traits UI (Enthought)

python print命令导致I/O错误

python - 如何使用Python计算图像上的彩色像素区域?

python - 获取特质听众列表——谁在听我的特质?

c++ - 如何使用 Opengl 加载和显示纹理