NPU Demo get error

Which version of system do you use? Khadas official images, self built images, or others?

Official Image
Linux Khadas 5.10.66 #1.5 SMP PREEMPT Tue Apr 25 13:57:32 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

Please describe your issue below:

I’m trying to
http://docs.khadas.com/products/sbc/edge2/npu/demos/yolov8n

version compatibility issues continue to occur

$ git clone https://github.com/ultralytics/ultralytics.git

$ sudo apt update
$ sudo apt install python3-dev python3-numpy

$ conda create -n npu-env python=3.8
$ conda activate npu-env

$ git clone https://github.com/rockchip-linux/rknn-toolkit2.git

$ cd rknn-toolkit2
$ sudo apt-get install python3 python3-dev python3-pip
$ sudo apt-get install libxslt1-dev zlib1g-dev libglib2.0 libsm6 libgl1-mesa-glx libprotobuf-dev gcc cmake
$ pip3 install -r doc/requirements_cp38-*.txt
$ pip3 install packages/rknn_toolkit2-*-cp38-cp38-linux_x86_64.whl

tensorflow is not for arm only x86-64 but edge2 is aarch64
I run above command on khadas edge2 right away
is it problem?

Post a console log of your issue below:

ERROR: Ignored the following versions that require a different python version: 1.11.0 Requires-Python <3.13,>=3.9; 1.11.0rc1 Requires-Python <3.13,>=3.9; 1.11.0rc2 Requires-Python <3.13,>=3.9; 1.11.1 Requires-Python <3.13,>=3.9; 1.11.2 Requires-Python <3.13,>=3.9; 1.11.3 Requires-Python <3.13,>=3.9; 1.11.4 Requires-Python >=3.9; 1.25.0 Requires-Python >=3.9; 1.25.0rc1 Requires-Python >=3.9; 1.25.1 Requires-Python >=3.9; 1.25.2 Requires-Python >=3.9; 1.26.0 Requires-Python <3.13,>=3.9; 1.26.0b1 Requires-Python <3.13,>=3.9; 1.26.0rc1 Requires-Python <3.13,>=3.9; 1.26.1 Requires-Python <3.13,>=3.9; 1.26.2 Requires-Python >=3.9
ERROR: Could not find a version that satisfies the requirement tensorflow==2.8.0 (from versions: 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0, 2.11.1, 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.12.1, 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1)
ERROR: No matching distribution found for tensorflow==2.8.0

@re_roy the model conversion must be done on x86-64 Ubuntu platform.
rknn-toolkit2 doesn’t support conversion on the device itself.

All model conversion work was done on my desktop and later work was done on Edge 2.

Thank you

I follow npu demo and failed to install packages on conda.

pip3 install -r doc/requirements_cp38-*.txt

ERROR: Ignored the following versions that require a different python version: 1.25.0 Requires-Python >=3.9; 1.25.1 Requires-Python >=3.9; 1.25.2 Requires-Python >=3.9; 
1.26.0 Requires-Python <3.13,>=3.9; 1.26.1 Requires-Python <3.13,>=3.9; 1.26.2 Requires-Python >=3.9; 1.26.3 Requires-Python >=3.9; 1.26.4 Requires-Python >=3.9; 2.0.0 R
equires-Python >=3.9; 2.0.1 Requires-Python >=3.9; 2.0.2 Requires-Python >=3.9; 2.1.0 Requires-Python >=3.10; 2.1.0rc1 Requires-Python >=3.10; 2.1.1 Requires-Python >=3.
10; 2.1.2 Requires-Python >=3.10; 2.1.3 Requires-Python >=3.10; 2.2.0 Requires-Python >=3.10; 2.2.0rc1 Requires-Python >=3.10; 2.2.1 Requires-Python >=3.10; 2.2.2 Requir
es-Python >=3.10; 2.2.3 Requires-Python >=3.10; 2.2.4 Requires-Python >=3.10                                                                                             
ERROR: Could not find a version that satisfies the requirement onnxoptimizer==0.1.0 (from versions: 0.2.7, 0.3.0, 0.3.1, 0.3.2, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10
, 0.3.11, 0.3.12, 0.3.13)                                                                                                                                                
ERROR: No matching distribution found for onnxoptimizer==0.1.0   

@re_roy @Electr1

How to solved?

PLEASE DO NOT EDIT THIS FILE

BOARD=Edge2
VENDOR=Rockchip
VERSION=1.6.5
ARCH=arm64
INITRD_ARCH=arm64
IMAGE_VERSION=1.6.5-240301
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-edges-u-boot-2017.09-v1.6.5-release
LINUX_GIT_VERSION=khadas-edges-linux-5.10-v1.6.5-release
FENIX_GIT_VERSION=v1.6.5
#############################################

@jiratto looks like you are not on the correct version of python, are you using python 3.8 ?