2

Python 用の Mahotas パッケージの使用に興味がありますが、残念ながら、インストールまたは実行で問題が発生しています。私が実行すると:

sudo pip install mahotas

私は得る:

Requirement already satisfied (use --upgrade to upgrade): mahotas in ./anaconda/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): numpy in ./anaconda/lib/python2.7/site-packages (from mahotas)
Cleaning up...

したがって、正しくインストールされていると思います。ドキュメントから簡単な例を複製しようとすると、次のメッセージが表示されます。

ImportError: 
mahotas.imread depends on one of (in order of preference):

1. imread
2. freeimage

None of which could be found!

Everything else will work, though, so this error is only triggered when you
attempt to use these optional functions.

To install imread:

On **Ubuntu**, run the following commands::

    sudo apt-get install libpng12-dev libtiff4-dev libwebp-dev python-pip python-dev g++
    sudo pip install imread

On **Mac OS**, if using ``port``, run the following commands::

    sudo port install libpng tiff webp
    sudo pip install imread

On **Windows**, use Christoph Gohlke's packages. See:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#imread




To install FreeImage:

You need to have the freeimage installed for imread/imsave (everything else
will work, though, so this error is only triggered when you attempt to use
these optional functions). Freeimage is not a Python package, but a regular
package.

Under Linux, look for a package called `freeimage` in your distribution (it is
actually called `libfreeimage3` in debian/ubuntu, for example).

Under Windows, consider using the third-party mahotas packages at
http://www.lfd.uci.edu/~gohlke/pythonlibs/ (kindly maintained by Christoph
Gohlke), which already package freeimage.

Full error was: mahotas.freeimage: could not find libFreeImage in any of thefollowing directories: '/Users/hmcoerver/anaconda/lib/python2.7/site-packages/mahotas/io', '/lib', '/usr/lib', '/usr/local/lib', '/opt/local/lib'

私はMacで作業しているので、提案どおりに実行します:

sudo port install libpng tiff webp
sudo pip install imread

それは私に与える:

--->  Computing dependencies for libpng
--->  Cleaning libpng
--->  Computing dependencies for tiff
--->  Cleaning tiff
--->  Computing dependencies for webp
--->  Cleaning webp
--->  Scanning binaries for linking errors
--->  No broken files found.

Requirement already satisfied (use --upgrade to upgrade): imread in ./anaconda/lib/python2.7/site-packages
Cleaning up...

だから私には、エラーメッセージが私に言ったように imread をインストールしたようです。しかし、私は同じメッセージを受け取り続けます..

これを解決する方法を知っている人はいますか?すべてのヘルプは大歓迎です!

4

0 に答える 0