当前位置: 首页 > 工具软件 > Mahotas > 使用案例 >

python运行过后的图片怎么找_在Python中安装mahotas后无法找到freeimage

徐淳
2023-12-01

image = mahotas.imread(‘image_file.jpg’)

Traceback (most recent call last):

File “”, line 1, in

File “/usr/local/lib/python2.6/dist-packages/mahotas-0.6.4-py2.6-linux-i686.egg/mahotas/init.py”, line 68, in imread

raise ImportError(‘mahotas.imread dependends on freeimage. Could not find it. Error was: %s’ % e)

ImportError: mahotas.imread dependends on freeimage. Could not find it. Error was: mahotas.freeimage: could not find libFreeImage in any of the following directories:

‘/usr/local/lib/python2.6/dist-packages/mahotas-0.6.4-py2.6-linux-i686.egg/mahotas’, ‘/lib’, ‘/usr/lib’, ‘/usr/local/lib’, ‘/opt/local/lib’

我尝试安装FreeImagePy并可以导入它没有任何问题,但它没有帮助.我已经尝试使用package sys添加到Python路径,但也没有帮助.

编辑:我应该提到除了pymorph和mahotas之外的所有软件包都已安装

在我的linux盒子上做’* sudo apt-get install package_name *’,而pymorph和mahotas是通过下载并执行’sudo python setup.py install’安装的.

 类似资料: