如何在树莓派上安装sktime?

huangapple go评论58阅读模式
英文:

How to install sktime on Raspberry Pi?

问题

我想在树莓派上使用sktime进行时间序列分类推理。我无法正确安装它以满足所需的依赖关系,尤其是numpy和numba。当我运行pip install sktime时,它会正确安装并且能够正常导入。但是当我尝试使用fitpredict时,它会抛出错误。

这导致以下错误:

UnsupportedParforsError: Failed in nopython mode pipeline (step: nopython mode backend)
The 'parallel' target is not currently supported on 32 bit hardware.
During: lowering "id=0[LoopNest(index_variable = parfor_index.62, range = (0, X_size0.1, 1)), LoopNest(index_variable = parfor_index.63, range = (0, $50binary_multiply.23, 1)){335: <ir.Block at /home/sashi/.local/lib/python3.9/site-packages/sktime/transformations/panel/rocket/_rocket_numba.py (180)>}Var($parfor_index_tuple_var.69, _rocket_numba.py:180)" at /home/sashi/.local/lib/python3.9/site-packages/sktime/transformations/panel/rocket/_rocket_numba.py (180)

我认为这是因为numpynumba的版本不兼容。

我尝试过pip install numba==0.53.0,但安装失败并显示Failed to build llvmlite

我的平台信息如下:

  • 当前操作系统
    Distributor ID: Raspbian
    Description: Raspbian GNU/Linux 11 (bullseye)
    Release: 11
    Codename: bullseye
    11.7

  • 内核
    6.1.21-v7+

  • 架构
    armv7l

  • 型号
    Raspberry Pi 3 Model B Rev 1.2

如何在树莓派上安装sktime?

非常感谢任何帮助!

英文:

I want to use sktime for time-series classification inference on a Raspberry Pi. I am not able to install it properly with the required dependencies, especially of numpy and numba. When I run pip install sktime it installs correctly and also import properly. But when I try to use fit or predict it throws an error.

pip install sktime

# In python interpreter
import numpy as np
from sktime.classification.kernel_based import RocketClassifier
rocket = RocketClassifier(num_kernels=2000)
X_train = np.array([[[1,2,3,4,4,5]], [[1,2,3,4,5,5]], [[1,2,4,5,6,7]]])
y_train = np.array([0, 0, 1])
rocket.fit(X_train, y_train)

This gives.

UnsupportedParforsError: Failed in nopython mode pipeline (step: nopython mode backend)
The &#39;parallel&#39; target is not currently supported on 32 bit hardware.
During: lowering &quot;id=0[LoopNest(index_variable = parfor_index.62, range = (0, X_size0.1, 1)), LoopNest(index_variable = parfor_index.63, range = (0, $50binary_multiply.23, 1))]{335: &lt;ir.Block at /home/sashi/.local/lib/python3.9/site-packages/sktime/transformations/panel/rocket/_rocket_numba.py (180)&gt;}Var($parfor_index_tuple_var.69, _rocket_numba.py:180)&quot; at /home/sashi/.local/lib/python3.9/site-packages/sktime/transformations/panel/rocket/_rocket_numba.py (180)

I believe it because the numpy and numba versions are incompatible.

numba             0.52.0
numpy             1.21.1

I tried pip install numba==0.53.0 but install fails with Failed to build llvmlite.

My platform is:

- Current OS
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
11.7
- Kernel
6.1.21-v7+
- Architecture
armv7l
- Model
Raspberry Pi 3 Model B Rev 1.2

How to install sktime on raspberry pi?

Any help if greatly appreciated!

答案1

得分: 1

根据错误信息,似乎 sktime 模型 roket_numba 只适用于 64 位架构。

您正在运行的是 32 位版本的 Raspbian,这就是问题所在。

英文:

Looking at the error it appears that the sktime model roket_numba only works on 64 bit architercture.

You are running a 32 bit version of Raspbian and that is the problem.

huangapple
  • 本文由 发表于 2023年7月11日 15:04:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/76659428.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定