在树莓派上升级 skimage 版本 [英] Upgrading skimage version on Raspberry pi
问题描述
我已经在 Raspberry Pi-2 上使用突触包管理器安装了 python 包.但是,skimage 模块版本 0.6 是突触中最新的可用版本.有人能指导我如何将其升级到 0.11,因为旧版本缺少某些功能.
I've installed python packages using the synaptic package manager on Raspberry Pi-2. However, the skimage module version 0.6 is the latest available version in synaptic. Can someone guide me how to upgrade it to 0.11, as certain functions are missing in the older version.
我尝试了 pip install scikit-image
,但它给出了输出
I tried pip install scikit-image
, but it gives the output
Running setup.py install for scikit image
然后卡在那里.
推荐答案
我不认为那里有什么问题.只是在 scikit-image
中有许多 C 扩展要编译,而且在 Raspberry Pi 上速度很慢.
I don't think there is anything wrong there. It's just that there is a number of C extensions to compile in scikit-image
and it is slow on Raspberry Pi.
例如,在我的带有 i7 双核 CPU 和 SSD 的笔记本电脑上,从源安装 scikit-image
大约需要 5 分钟.现在,如果考虑到 RP2 上的 CPU 至少慢一个数量级,再加上速度较慢的 SD 卡,在 RP2 上编译可能需要几个小时.
For instance, on my laptop with i7 dual core CPU and an SSD, it takes around 5 minutes to install scikit-image
from sources. Now if you take into account that the CPU on the RP2 is at least one order of magnitude slower, coupled with a slow SD card, it could take several hours to compile on a RP2.
您可以查看是否可以并行运行编译以加快速度,尽管我不确定这是否适用于 pip
和 Python 模块的 C 扩展.
You can see if you can run the compilations in parallel to speed things up, although I'm not sure if this is doable with pip
and C extensions for a python module.
这篇关于在树莓派上升级 skimage 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!