Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:edge-2l:npu:rknn-sdk-quick-start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:edge-2l:npu:rknn-sdk-quick-start [2026/05/31 23:30]
nick
products:sbc:edge-2l:npu:rknn-sdk-quick-start [2026/05/31 23:55] (current)
nick [Run RKNN Python demo]
Line 6: Line 6:
 ===== Prepare development environment ===== ===== Prepare development environment =====
 The version information we are using is as follows:  The version information we are using is as follows: 
-  * Host PC Python: 3.10+  * Host PC Python: 3.8
   * rknn-toolkit2: 2.3.2   * rknn-toolkit2: 2.3.2
   * rknn model zoo: 2.3.2   * rknn model zoo: 2.3.2
  
-==== Download RKNN related repositories ====+==== Download RKNN related repositories - Host PC ====
 It is recommended to create a new directory to store the RKNN repositories. For example, create a folder named ''Projects'' and place the RKNN-Toolkit2 and RKNN Model Zoo repositories in that directory. Refer to the following commands It is recommended to create a new directory to store the RKNN repositories. For example, create a folder named ''Projects'' and place the RKNN-Toolkit2 and RKNN Model Zoo repositories in that directory. Refer to the following commands
  
Line 26: Line 26:
 ``` ```
  
-==== Install the RKNN-Toolkit2 environment on your host PC ====+==== Install the RKNN-Toolkit2 environment on your Host PC ====
  
-=== Install Python === +=== Install Python - Host PC === 
-If the Python 3.10 environment is not installed on your system, or if there are multiple versions of Python installed, it is recommended to use Miniforge Conda to create a new Python 3.10 environment.+If the Python 3.environment is not installed on your system, or if there are multiple versions of Python installed, it is recommended to use Miniforge Conda to create a new Python 3.environment.
  
-=== Install Miniforge Conda ===+=== Install Miniforge Conda - Host PC ===
  
 Download the Miniforge Conda installer from the following link: Download the Miniforge Conda installer from the following link:
Line 43: Line 43:
 $ bash Miniforge3-Linux-x86_64.sh $ bash Miniforge3-Linux-x86_64.sh
 ``` ```
-=== Create Python environment using miniforge conda ===+=== Create Python environment using miniforge conda - Host PC ===
 In the terminal window on the computer, execute the following command to switch to the Miniforge conda base In the terminal window on the computer, execute the following command to switch to the Miniforge conda base
 environment: environment:
Line 49: Line 49:
 $ source ~/miniforge3/bin/activate $ source ~/miniforge3/bin/activate
 ``` ```
-Create a Python 3.10 environment named ''py310Toolkit2.3.2'' using the following command:+Create a Python 3.environment named ''py38Toolkit2.3.2'' using the following command:
 ```shell ```shell
-$ conda create -n py38Toolkit2.3.2 python=3.10+$ conda create -n py38Toolkit2.3.2 python=3.8
 ``` ```
-Activate the ''py310Toolkit2.3.2'' environment. Subsequently, RKNN-Toolkit2 will be installed in this environment+Activate the ''py38Toolkit2.3.2'' environment. Subsequently, RKNN-Toolkit2 will be installed in this environment
 ```shell ```shell
-$ conda activate py310Toolkit2.3.2+$ conda activate py38Toolkit2.3.2
 ``` ```
-=== Install RKNN-Toolkit2 ===+=== Install RKNN-Toolkit2 - Host PC ===
 Install via local wheel packag. Install via local wheel packag.
  
 ```shell ```shell
 $ cd rknn-toolkit2/rknn-toolkit2/packages/x86_64/ $ cd rknn-toolkit2/rknn-toolkit2/packages/x86_64/
-$ pip3 install -r requirements_cp310-2.3.2.txt +$ pip3 install -r requirements_cp38-2.3.2.txt 
-$ pip3 install ./rknn_toolkit2-2.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl+$ pip3 install ./rknn_toolkit2-2.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
 ``` ```
  
-=== Check if the RKNN-Toolkit2 Environment is Installed Successfully ===+=== Check if the RKNN-Toolkit2 environment - Host PC ===
 Switch to Python interactive mode Switch to Python interactive mode
 ```shell ```shell
Line 189: Line 189:
 Modify the demo code: Modify the demo code:
  
-```python+```diff
 diff --git a/py_utils/rknn_executor.py b/py_utils/rknn_executor.py diff --git a/py_utils/rknn_executor.py b/py_utils/rknn_executor.py
 index 21b4132..46b24d4 100644 index 21b4132..46b24d4 100644
Last modified: 2026/05/31 23:30 by nick