1

我按照所有说明在 Android Studio 上导入 chaquopy 并且我的 hello word 程序有效,但是当我尝试运行我正在导入 skimage 的 HOG 程序时,它给了我错误,因为没有名为 skimage 的模块。我已经在模块级 build.gradle 文件的 pip 块中添加了所需的库,但它仍然给了我错误。我正在使用 chauopy 6.3.0 版和 Android gradle 3.5.0 版。

import matplotlib.pyplot as plt
from skimage import io
from skimage.feature import hog
from skimage import data, color, exposure
from PIL import Image
#%%
img = io.imread(r"Insert\Image\Path\Here.jpg")
#im= Image.open(r"Insert\Image\Path\Here.jpg")
image = color.rgb2gray(img)

build.gradle 文件中的 PIP 块

python{

   pip{

             install "scikit-image"
             install "numpy"
             install "matplotlib"
             install "scikit-learn"

        }
 }
4

0 回答 0