英文:
How to install sktime on Raspberry Pi?
问题
我想在树莓派上使用sktime进行时间序列分类推理。我无法正确安装它以满足所需的依赖关系,尤其是numpy和numba。当我运行pip install sktime
时,它会正确安装并且能够正常导入。但是当我尝试使用fit
或predict
时,它会抛出错误。
这导致以下错误:
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)
我认为这是因为numpy
和numba
的版本不兼容。
我尝试过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 '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)
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论