aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Murtagh <francis.murtagh@arm.com>2023-01-25 16:18:45 +0000
committerMatthew Sloyan <matthew.sloyan@arm.com>2023-01-31 13:08:16 +0000
commit417abd436573c0b6f3def468f69211b653e35f1f (patch)
treea46325cb6a8021941164f19a7ca8bc756f32ab53
parent00ca496da643ff167c3851f3cdec864b14d173d4 (diff)
downloadarmnn-417abd436573c0b6f3def468f69211b653e35f1f.tar.gz
GitHub #651: Add PyArmNN installation instructions for prebuilt binaries
* Previous instruction didn't generate SWIG wrappers. Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I8e4a28ad334fc7fec1740d520d1fde9359c30397
-rw-r--r--python/pyarmnn/README.md40
-rw-r--r--python/pyarmnn/README.md.license2
2 files changed, 40 insertions, 2 deletions
diff --git a/python/pyarmnn/README.md b/python/pyarmnn/README.md
index 3962e11395..0defd910b0 100644
--- a/python/pyarmnn/README.md
+++ b/python/pyarmnn/README.md
@@ -50,7 +50,7 @@ The recommended way to build the python packages is by CMake.
### CMake build
-The recommended aproach is to build PyArmNN together with Arm NN by adding the following options to your CMake command:
+The recommended approach is to build PyArmNN together with Arm NN by adding the following options to your CMake command:
```
-DBUILD_PYTHON_SRC=1
```
@@ -113,6 +113,44 @@ $ python -c "import pyarmnn as ann;print(ann.GetVersion())"
'32.0.0'
```
+
+## Installing PyArmNN while using ArmNN prebuilt binaries
+
+If you wish to use ArmNN prebuilt binaries from our release page, you will need to generate the PyArmNN SWIG wrappers.
+
+Again setup your environmental variables along with a virtual environment:
+
+```bash
+$ python -m venv env
+$ source env/bin/activate
+
+$ export ARMNN_LIB=/path/to/libs
+$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/libs
+$ export ARMNN_INCLUDE=/full/path/to/armnn/include:/full/path/to/armnn/profiling/common/include
+```
+
+Then generate the SWIG wrappers:
+```bash
+$ cd armnn/python/pyarmnn/
+$ python swig_generate.py -v
+```
+
+Then install PyArmNN:
+```bash
+# From directory armnn/python/pyarmnn/
+$ pip install .
+```
+
+As above, you can verify that PyArmNN library is installed and check PyArmNN version using:
+```bash
+$ pip show pyarmnn
+```
+You can also verify it by running the following and getting output similar to below:
+```bash
+$ python -c "import pyarmnn as ann;print(ann.GetVersion())"
+'32.0.0'
+```
+
# PyArmNN API overview
#### Getting started
diff --git a/python/pyarmnn/README.md.license b/python/pyarmnn/README.md.license
index 6b63511843..d1f04aeae2 100644
--- a/python/pyarmnn/README.md.license
+++ b/python/pyarmnn/README.md.license
@@ -1,4 +1,4 @@
#
-# Copyright © 2020-2022 Arm Ltd and Contributors. All rights reserved.
+# Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved.
# SPDX-License-Identifier: MIT
#