python - 在树莓派上安装 scikit-image 时出现问题
问题描述
我正在尝试在我的树莓派上安装 sci-kit 映像,但遇到了一些问题。以前它给了我文件'libaec.h'丢失的错误。我使用pip安装了libaec,然后那个错误就解决了。但是,现在它给了我“blosc.h”缺失的错误。我设法用 pip 安装了 blosc 但错误仍然存在(仅显示错误消息的最后一部分):
building 'imagecodecs._blosc' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_blosc.c -o build/temp.linux-armv7l-3.7/imagecodecs/_blosc.o
In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1822,
from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
from /usr/include/python3.7m/numpy/arrayobject.h:4,
from imagecodecs/_blosc.c:598:
/usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \
^~~~~~~
imagecodecs/_blosc.c:602:10: fatal error: blosc.h: No such file or directory
#include "blosc.h"
^~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-txmkharf/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-record-1ugl_qdj/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-txmkharf/imagecodecs/
pi@raspberrypi:~ $ sudo pip3 install blosc
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: blosc in /usr/local/lib/python3.7/dist-packages (1.9.1)
pi@raspberrypi:~ $
关于如何解决这个问题的任何想法?blosc 的位置是否正确?如果没有,我怎样才能将它移动到正确的位置?
解决方案
我在安装依赖于图像编解码器的包时遇到了同样的问题。我能够通过使用将 pip 从版本 18 更新到版本 20 来解决它
pip3 install --upgrade pip
推荐阅读
- google-cloud-platform - 扩展 PubsubIO.Read 去重窗口
- c# - 如何以 Windows 形式将新的过滤器运算符添加到 Telerik radgridview
- c - 即使在代码中明确给出了声明,我的 gcc 编译器也会警告我隐式声明函数
- python - 如何从图像中识别单个数字?
- c++ - OpenCV meanStdDev 在巨大的图像上崩溃
- python - 无法替换字符“\”
- c# - 如何获得估计的下载时间
- wordpress - 502 Bad Gateway - SSL 握手错误:错误的版本号
- android - connection to FireStore in Android Studio
- slack-api - 我可以将多语言机器人从 AWS Lex V2 控制台集成到 Slack 吗?(未经翻译)