安装 scikit-image 的问题可能是由于 blosc

si_*_*mon 8 python installation scikit-image

嗨,我正在尝试在 ubuntu 18.04 的虚拟环境中安装 scikit 映像。

它在尝试安装 imagecodecs 时失败,我尝试单独安装 imagecodecs,但它给出了相同的错误,这是由于 blosc 引起的。我单独安装了 blosc,但不知何故这仍然失败。

    /usr/include/python3.6m/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it by " \
      ^~~~~~~
    imagecodecs/_blosc.c:602:10: fatal error: blosc.h: No such file or directory
     #include "blosc.h"
              ^~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/home/xxxx/im_an/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ijwkwo7f/imagecodecs/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-4xtori6c-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/xxxx/im_an/include/site/python3.6/imagecodecs" failed with error code 1 in /tmp/pip-build-ijwkwo7f/imagecodecs/

Run Code Online (Sandbox Code Playgroud)

我希望有人能帮我解决这个问题。谢谢

小智 1

您的安装中缺少开发库(包括 *h)。您可以像这样安装它们:

sudo apt-get install libblosc-dev
Run Code Online (Sandbox Code Playgroud)

您也会遇到其他库的问题:

sudo apt-get install libbrotli-dev
Run Code Online (Sandbox Code Playgroud)

ETC。