(a200-3000) cann software installation guide - huawei …atlas intelligent edge solution v100r020c00...

51
Atlas Intelligent Edge Solution V100R020C00 CANN Software Installation Guide (A200-3000) Issue 01 Date 2021-02-08 HUAWEI TECHNOLOGIES CO., LTD.

Upload: others

Post on 19-Feb-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

  • Atlas Intelligent Edge SolutionV100R020C00

    CANN Software Installation Guide(A200-3000)

    Issue 01

    Date 2021-02-08

    HUAWEI TECHNOLOGIES CO., LTD.

  • Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved.

    No part of this document may be reproduced or transmitted in any form or by any means without priorwritten consent of Huawei Technologies Co., Ltd. Trademarks and Permissions

    and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.All other trademarks and trade names mentioned in this document are the property of their respectiveholders. NoticeThe purchased products, services and features are stipulated by the contract made between Huawei andthe customer. All or part of the products, services and features described in this document may not bewithin the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,information, and recommendations in this document are provided "AS IS" without warranties, guaranteesor representations of any kind, either express or implied.

    The information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but all statements, information, andrecommendations in this document do not constitute a warranty of any kind, express or implied.

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. i

  • Contents

    1 Installation Precautions......................................................................................................... 1

    2 Hardware Requirements........................................................................................................ 2

    3 Installing the Development Environment......................................................................... 33.1 Before You Start....................................................................................................................................................................... 33.2 Obtaining Software Packages............................................................................................................................................. 43.3 Preparations for Installation................................................................................................................................................ 73.3.1 Ubuntu (x86)......................................................................................................................................................................... 83.4 Pure Development................................................................................................................................................................ 133.4.1 Installing the Development Kit (Easy Installation Tool)...................................................................................... 133.4.2 Installing the Development Kit (CLI).......................................................................................................................... 153.5 Development + Commissioning....................................................................................................................................... 173.5.1 Installing the AI Accelerator Module Driver and Firmware................................................................................ 173.5.2 Installing the Development Kit (Easy Installation Tool)...................................................................................... 183.5.3 Installing the Development Kit (CLI).......................................................................................................................... 193.6 Verifying the Development Environment..................................................................................................................... 22

    4 Installing the Operating Environment............................................................................. 234.1 Obtaining Software Packages...........................................................................................................................................234.2 Installation on a Physical Machine................................................................................................................................. 254.2.1 Preparations for Installation.......................................................................................................................................... 254.2.2 Installing the Operating Environment (Easy Installation Tool)......................................................................... 274.2.3 Installing the Operating Environment (CLI).............................................................................................................294.2.3.1 Installing the AI Accelerator Module Driver and Firmware.............................................................................294.2.3.2 Installing the Inference Software............................................................................................................................. 294.2.4 Verifying the Operating Environment........................................................................................................................ 31

    5 Common Operations............................................................................................................ 325.1 Configuring the NIC IP Address....................................................................................................................................... 325.2 Uninstalling the Ascend Chip Driver Firmware and Inference Software (Easy Installation Tool).............345.3 Upgrading the Ascend Chip Driver Firmware and Inference Software (Easy Installation Tool)................365.4 Upgrading the CANN Software (CLI).............................................................................................................................375.5 Uninstalling the CANN Software (CLI)..........................................................................................................................375.6 Setting User Account Validity Period............................................................................................................................. 38

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) Contents

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. ii

  • 6 FAQs..........................................................................................................................................406.1 What Do I Do If the "Software Has Been Installed" During RUN Package Installation?............................ 406.2 pip3.7.5 install numpy Error.............................................................................................................................................. 416.3 The error message "subprocess.CalledProcessError: Command '('lsb_release', '-a')' return non-zero exitstatus 1 " is displayed during pip3.7.5 installation...........................................................................................................416.4 What Do I Do If "Could not find a version that satisfies the requirement xxx" Is Displayed Whenpip3.7.5 install Is Run?................................................................................................................................................................426.5 Installing CMake 3.5.2......................................................................................................................................................... 436.6 Configuring a System Network Proxy............................................................................................................................ 44

    7 Reference.................................................................................................................................457.1 Parameters.............................................................................................................................................................................. 45

    A Change History...................................................................................................................... 47

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) Contents

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. iii

  • 1 Installation PrecautionsThis document applies to the EP mode.

    Development EnvironmentThe development environment is used to convert model files, develop and compileapplications, and develop operators.

    If you need to debug an application (for example, an image classificationapplication) in the development environment in addition to developing andcompiling the application, you need to configure Ascend AI devices (such as AIaccelerator modules) in the development environment.

    The pure development environment requires only the development kit to beinstalled.

    In the development + commissioning scenario, you also need to install the driverand firmware corresponding to the AI accelerator module.

    Installing the Operating EnvironmentThe operating environment is the environment for running applications developedby users. The operating environment requires the configuration of Ascend AIdevices. See Atlas 200 AI accelerator module.

    For the operating environment, install the Ascend chip driver, firmware, offlineinference engine package, and Toolbox on a physical machine.

    Easy Installation ToolThe easy installation tool allows users to install software required by a specificservice scenario by one click. For example, users can install the inference operatingenvironment and install Ascend chip drivers, firmware, inference engines, andToolbox at the same time by one click. You are advised to use the easy installationtool to install the software, improving the installation efficiency.

    The installation of the development environment mainly involves the installationof the development kit. Therefore, the speed of installing the developmentenvironment by using the easy installation tool is similar to that by using the CLI.You can select the installation mode as required.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 1 Installation Precautions

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 1

  • 2 Hardware RequirementsBefore installing the development and operating environments, you need toprepare the hardware environment based on the scenario.

    Scenario Hardware

    Developmentenvironment

    General-purpose server

    Development andcommissioningenvironment

    Inference devices with Atlas 200 AI accelerator module(model 3000)

    Operatingenvironment

    Table 2-1 Supported OSs

    OS Version How to Obtain

    Ubuntu OS version: Ubuntu18.04.1Kernel version:4.15.0-29-genericOS architecture: x86

    Official Ubuntu websiteDownload the recommended versionubuntu-18.04.1-server-amd64.iso from http://old-releases.ubuntu.com/releases/18.04.1/.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 2 Hardware Requirements

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 2

    http://old-releases.ubuntu.com/releases/18.04.1/http://old-releases.ubuntu.com/releases/18.04.1/

  • 3 Installing the Development Environment3.1 Before You Start

    3.2 Obtaining Software Packages

    3.3 Preparations for Installation

    3.4 Pure Development

    3.5 Development + Commissioning

    3.6 Verifying the Development Environment

    3.1 Before You Start● If the development environment is used only for model file conversion,

    application development and compilation, and operator development, thedevelopment environment can be a general-purpose server or a PC. In thiscase, you do not need to configure the Ascend AI device, and only need toinstall the development kit (Ascend-Toolkit-{version}-xxx-{gcc_version}.run). For details, see the following sections:

    a. 3.2 Obtaining Software Packages

    b. 3.3 Preparations for Installation

    c. 3.4 Pure Development

    d. 3.6 Verifying the Development Environment

    ● In addition to converting model files, developing and compiling applications,and developing operators, you need to debug applications in the developmentenvironment (for example, debugging image classification applications in thedevelopment environment). In this case, you need to configure the Ascend AIdevice in the development environment and install the driver and firmware ofthe Ascend AI device, and development kit (Ascend-Toolkit-{version}-xxx-{gcc_version}.run). For details, see the following sections:

    a. 3.2 Obtaining Software Packages

    b. 3.3 Preparations for Installation

    c. 3.5 Development + Commissioning

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 3

  • d. 3.6 Verifying the Development Environment

    NO TE

    Use the easy installation tool to install the software.● You must install the software as the root user.● The software cannot be installed in a specified directory. It can be installed only

    in the default directory /usr/local/Ascend.

    3.2 Obtaining Software PackagesBefore installing the software, obtain software packages based on the actualscenario. The versions of the software packages must be consistent. The procedureis as follows:

    Step 1 Log in to the Resources page and select the corresponding product series andproduct model.

    Step 2 Obtain the software packages according to the OS type and GCC version.● For a pure development scenario, see Table 3-1.● For a development and commissioning scenario, see Table 3-2.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 4

    https://www.huaweicloud.com/intl/en-us/ascend/resource/Software

  • Table 3-1 Software packages for a pure development scenario

    Name SoftwarePackage

    OSArchitecture

    GCCVersion

    InstallationUser

    Description

    Developmentkit

    Ascend-Toolkit-{version}-x86_64-linux_gcc7.3.0.run

    Ubuntux86

    7.3.0 root ornon-root. Iftheinstallation useris anon-rootuser,theownergroupof theinstallation usermust bethesame asthat ofthedriveroperating userHwHiAiUser.

    It is used forapplicationdevelopment, customoperator, and modelconversion. Thedevelopment kitcontains the libraryfiles required fordevelopingapplications anddevelopment auxiliarytools such as the ATCmodel conversion tool.

    Easyinstallationtool

    ascend-sdk-manager-{version}-x86-ubuntu.tgz

    Ubuntux86

    - root Use an easyinstallation tool toinstall thedevelopmentenvironment.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 5

  • Table 3-2 Software packages for a development and commissioning scenario

    Name SoftwarePackage

    OSArchitecture

    GCCVersion

    InstallationUser

    Description

    AIacceleratormoduledriverpackage

    A200-3000-NPU_Driver-{version}-X86_64-Ubuntu18.04.run

    Ubuntux86

    - Theinstallation usermust betherootuser,and therunningusermust beHwHiAiUser.HwHiAiUsermust becreatedbeforetheinference carddriverandfirmware areinstalled.

    AI accelerator moduledriver.

    AIacceleratormodulefirmwarepackage

    A200-3000-NPU_Firmware-{version}.run

    AI accelerator modulefirmware.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 6

  • Name SoftwarePackage

    OSArchitecture

    GCCVersion

    InstallationUser

    Description

    Developmentkit

    Ascend-Toolkit-{version}-x86_64-linux_gcc7.3.0.run

    Ubuntux86

    7.3.0 root ornon-root. Iftheinstallation useris anon-rootuser,theownergroupof theinstallation usermust bethesame asthat ofthedriveroperating userHwHiAiUser.

    It is used forapplicationdevelopment, customoperator, and modelconversion. Thedevelopment kitcontains the libraryfiles required fordevelopingapplications anddevelopment auxiliarytools such as the ATCmodel conversion tool.

    Easyinstallationtool

    ascend-sdk-manager-{version}-x86-ubuntu.tgz

    Ubuntux86

    - root Use an easyinstallation tool toinstall thedevelopmentenvironment.

    ----End

    NO TE

    {version} indicates the software version, and {os} indicates the OS. Obtain the softwarepackage based on the GCC version planned or deployed onsite. You can run the gcc --version command on the OS to query the GCC version. If the GCC version is earlier than7.3.0, obtain the GCC 4.8.5 software package, if the GCC version is 7.3.0 or later, obtain theGCC 7.3.0 software package. The GCC versions of the software packages installed in thedevelopment environment and operating environment must be the same. Otherwise, theapplications compiled in the development environment fail to run in the operatingenvironment.

    3.3 Preparations for Installation

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 7

  • 3.3.1 Ubuntu (x86)

    Environment Requirements

    The following software or dependencies need to be installed for the developmentkit, Python, auxiliary development tools, and application compilation.

    Table 3-3 Dependency information

    Parameter Version

    Python 3.7.5

    cmake 3.5.1+

    protobuf 3.11.3+

    g++ 7.3.0 or later

    gcc 7.3.0 or later

    makezlib1gzlib1g-devlibsqlite3-devopenssllibssl-devlibffi-devunzippciutilsnet-toolsattrspsutildecoratornumpyscipysympycffigrpciogrpcio-toolsrequests

    There is no version requirement. The version to beinstalled is subject to the source provided by the OS.

    Checking the umask of the root User1. Log in to the installation environment as the root user.2. Check the umask value of the root user.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 8

  • umask

    3. If the umask value is not 0022, append "umask 0022" to the file and save thefile:vi ~/.bashrcsource ~/.bashrc

    Creating Installation and Running Users

    In addition to converting model files, developing and compiling applications, anddeveloping operators, if you need to debug applications in the developmentenvironment (for example, debugging image classification applications), you needto configure the Ascend AI device in the development environment. In this case,you need to install the driver and firmware of the Ascend AI device. Table 3-4 liststhe users for installing and running the firmware and CANN software.

    Table 3-4 List of installation users and running users

    PackageType

    Installation User Running User

    Driver andfirmwareinstallationpackage

    The user must be root. The value must be HwHiAiUser, andHwHiAiUser must be created beforethe inference card driver and firmwareare installed.

    CANNsoftwarepackage

    The user can be root ornon-root. For details, seethe following contentbelow the table.

    The user must be a non-root user. Fordetails, see the following contentbelow the table.

    You must create the HwHiAiUser user before installing the CANN software as theroot user or a non-root user.

    1. Create the HwHiAiUser user.

    Switch to the root user and run the following command to create theHwHiAiUser user:groupadd HwHiAiUser //Create the HwHiAiUser user group.useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser // Create an HwHiAiUser user whose owner group is HwHiAiUser.

    The user group of the HwHiAiUser user must be HwHiAiUser.

    2. Select an installation mode.

    – For installation as the root user:

    You can install the software as the root user, but you must create theHwHiAiUser user. After the CANN software is installed, you must run thesoftware as a non-root user, that is, the running user can only be in theHwHiAiUser user group.

    – For installation as a non-root user:

    In this scenario, the installation and running users must be the same.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 9

  • ▪ If a non-root user exists, add the user to the HwHiAiUser user groupand switch to the user for normal installation. The defaultinstallation user and running user are the current user.

    ▪ If you want to use a new non-root user, you need to create the userfirst.

    To create a non-root user, run the following commands as the root user:

    a. Create a non-root user.useradd -g HwHiAiUser -d /home/username -m username

    username is user-defined, but its owner group must be HwHiAiUser.b. Set the password of the non-root user.

    passwd username

    NO TE

    ● The created running user cannot belong to the root user group.● After the HwHiAiUser user is created, do not disable the login authentication function

    of the user.● The password validity period is 90 days. You can change the validity period in the /etc/

    login.defs file or using the chage command. For details, see 5.6 Setting User AccountValidity Period.

    (Optional) Configuring the Permission of the Installation UserSkip the following part if you install as the root user.

    Before installing the development kit, you need to download the dependencies,which require sudo apt-get permission. Run the following commands as the rootuser:

    1. Open the /etc/sudoers file:chmod u+w /etc/sudoersvi /etc/sudoers

    2. Add the following content below # User privilege specification of the file:username ALL=(ALL:ALL) NOPASSWD:SETENV:/usr/bin/apt-get, /usr/bin/pip, /bin/tar, /bin/mkdir, /bin/rm, /bin/sh, /bin/cp, /bin/bash, /usr/bin/make install, /bin/ln -s /usr/local/python3.7.5/bin/python3 /usr/bin/python3.7, /bin/ln -s /usr/local/python3.7.5/bin/pip3 /usr/bin/pip3.7, /bin/ln -s /usr/local/python3.7.5/bin/python3 /usr/bin/python3.7.5, /bin/ln -s /usr/local/python3.7.5/bin/pip3 /usr/bin/pip3.7.5, /usr/bin/unzip

    Replace username with the name of the common user who executes theinstallation script.

    NO TE

    Ensure that the last line of the /etc/sudoers file is #includedir /etc/sudoers.d.Otherwise, add it manually.

    3. Run :wq! to save the file.4. Run the following command to revoke the write permission on the /etc/

    sudoers file:chmod u-w /etc/sudoers

    Checking the Source ValidityDevelopment kit installation requires the download of related dependencies.Ensure that the installation environment can be connected to the network.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 10

  • Run the following command as the root user to check whether the source is valid:

    apt-get update

    If an error is reported during command execution or dependency installation,check whether the network connection is normal, or replace the source inthe /etc/apt/sources.list file with an available source or use an image source. Fordetails about how to configure a network proxy, see 6.6 Configuring a SystemNetwork Proxy.

    Installing DependenciesNO TE

    ● If you install Python and its dependencies as the root user, perform Step 1 to Step 3.Note that the sudo keywords in the commands need to be deleted if any.

    ● If you install Python and its dependencies as a non-root user, run the su - usernamecommand to switch to the non-root user and perform Step 1 to Step 3.

    Step 1 Check whether the Python dependencies and GCC software are installed.

    Run the following commands to check whether the dependencies such as GCC,Make, and Python are installed:gcc --versiong++ --versionmake --versioncmake --versiondpkg -l zlib1g| grep zlib1g| grep iidpkg -l zlib1g-dev| grep zlib1g-dev| grep iidpkg -l libsqlite3-dev| grep libsqlite3-dev| grep iidpkg -l openssl| grep openssl| grep iidpkg -l libssl-dev| grep libssl-dev| grep iidpkg -l libffi-dev| grep libffi-dev| grep iidpkg -l unzip| grep unzip| grep iidpkg -l pciutils| grep pciutils| grep iidpkg -l net-tools| grep net-tools| grep ii

    If the following information is displayed, the installation is complete. Go to thenext step.

    gcc (Ubuntu 7.3.0-3ubuntu1~18.04) 7.3.0g++ (Ubuntu 7.3.0-3ubuntu1~18.04) 7.3.0GNU Make 4.1cmake version 3.10.2zlib1g:amd64 1:1.2.11.dfsg-0ubuntu2 amd64 compression library - runtimezlib1g-dev:amd64 1:1.2.11.dfsg-0ubuntu2 amd64 compression library - developmentlibsqlite3-dev:amd64 3.22.0-1ubuntu0.3 amd64 SQLite 3 development filesopenssl 1.1.1-1ubuntu2.1~18.04.5 amd64 Secure Sockets Layer toolkit - cryptographic utilitylibssl-dev:amd64 1.1.1-1ubuntu2.1~18.04.5 amd64 Secure Sockets Layer toolkit - development fileslibffi-dev:amd64 3.2.1-8 amd64 Foreign Function Interface library (development files)unzip 6.0-21ubuntu1 amd64 De-archiver for .zip filespciutils 1:3.5.2-1ubuntu1.1 amd64 Linux PCI Utilitiesnet-tools 1.60+git20161116.90da8a0-1ubuntu1 amd64 NET-3 networking toolkit

    Otherwise, run the following command to install the software. You can change thefollowing command to install only some of them as required.sudo apt-get install -y gcc g++ make cmake zlib1g zlib1g-dev libsqlite3-dev openssl libssl-dev libffi-dev unzip pciutils net-tools

    Step 2 Check whether the Python development environment is installed.

    The development kit depends on the Python environment. Run the python3.7.5 --version and pip3.7.5 --version commands to check whether Python has been

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 11

  • installed. If the following information is displayed, Python has been installed. Goto the next step.

    Python 3.7.5pip 19.2.3 from /usr/local/python3.7.5/lib/python3.7/site-packages/pip (python 3.7)

    Otherwise, use the following procedure to install Python 3.7.5:

    1. Run the wget command to download the source code package of Python3.7.5 to any directory of the installation environment. The command is asfollows:wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz

    2. Run the following command to go to the download directory and decompressthe source code package:tar -zxvf Python-3.7.5.tgz

    3. Go to the decompressed folder and run the following configuration, build, andinstallation commands:cd Python-3.7.5./configure --prefix=/usr/local/python3.7.5 --enable-sharedmakesudo make install

    The --prefix parameter specifies the Python installation path. You can changeit based on the site requirements. The --enable-shared parameter is used tocompile the libpython3.7m.so.1.0 dynamic library.

    This document uses --prefix=/usr/local/python3.7.5 as an example. After theconfiguration, compilation, and installation commands are executed, theinstallation package is output to the /usr/local/python3.7.5 directory, and thelibpython3.7m.so.1.0 dynamic library is output to the /usr/local/python3.7.5/lib/libpython3.7m.so.1.0 directory.

    4. Check whether libpython3.7m.so.1.0 exists in /usr/lib64 or /usr/lib. If yes,skip this step or back up the libpython3.7m.so.1.0 file provided by the systemand run the following command:

    Copy the compiled file libpython3.7m.so.1.0 to /usr/lib64:sudo cp /usr/local/python3.7.5/lib/libpython3.7m.so.1.0 /usr/lib64

    When the following information is displayed, enter y to overwrite thelibpython3.7m.so.1.0 file provided by the system.cp: overwrite 'libpython3.7m.so.1.0'?y

    If the /usr/lib64 directory does not exist in the environment, copy the file tothe /usr/lib directory.sudo cp /usr/local/python3.7.5/lib/libpython3.7m.so.1.0 /usr/lib

    Replace the path of the libpython3.7m.so.1.0 file as required.

    5. Run the following commands to set the soft link:sudo ln -s /usr/local/python3.7.5/bin/python3 /usr/bin/python3.7sudo ln -s /usr/local/python3.7.5/bin/pip3 /usr/bin/pip3.7sudo ln -s /usr/local/python3.7.5/bin/python3 /usr/bin/python3.7.5sudo ln -s /usr/local/python3.7.5/bin/pip3 /usr/bin/pip3.7.5

    If a message indicating that the link already exists is displayed during thecommand execution, run the following command to delete the existing linkand run the command again:sudo rm -rf /usr/bin/python3.7.5sudo rm -rf /usr/bin/pip3.7.5sudo rm -rf /usr/bin/python3.7sudo rm -rf /usr/bin/pip3.7

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 12

  • 6. After the installation is complete, run the following commands to check theinstallation version. If the required version information is displayed, theinstallation is successful.python3.7.5 --versionpip3.7.5 --version

    Step 3 Install the Python 3 development environment.

    Before the installation, run the pip3.7.5 list command to check whether thedependencies have been installed. If yes, skip this step. If not, run the followingcommand to install the dependencies: (If only some of the software is notinstalled, modify the following command to install selected software only.) TheModel Accuracy Analyzer in the Toolkit depends on protobuf and SciPy. Profilingdepends on protobuf, grpcio, grpcio-tools, and requests.

    If you install Python and its dependencies as a non-root user, add --user at theend of each command in this step to ensure that the installation is successful.Example command: pip3.7.5 install attrs --user

    pip3.7.5 install attrs pip3.7.5 install psutil pip3.7.5 install decorator pip3.7.5 install numpy pip3.7.5 install protobuf==3.11.3 pip3.7.5 install scipy pip3.7.5 install sympy pip3.7.5 install cffi pip3.7.5 install grpcio pip3.7.5 install grpcio-tools pip3.7.5 install requests

    During the command execution, if the network connection fails and the message"Could not find a version that satisfies the requirement xxx" is displayed, rectifythe fault by referring to 6.4 What Do I Do If "Could not find a version thatsatisfies the requirement xxx" Is Displayed When pip3.7.5 install Is Run?.

    ----End

    3.4 Pure Development

    3.4.1 Installing the Development Kit (Easy Installation Tool)Use an easy installation tool to install the development environment.

    Prerequisites● Prepare for the installation by referring to 3.3 Preparations for Installation.● Obtain the development kit Ascend-Toolkit-{version}-xxx-{gcc_version}.run

    by referring to 3.2 Obtaining Software Packages.

    Obtaining an Easy Installation Tool

    Download the easy installation tool ascend-sdk-manager-{version}-{arch}-{os}.tgz based on your OS architecture and upload the tool to any directory onthe server, for example, /home/HwHiAiUser.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 13

  • Run the tar -xzvf ascend-sdk-manager-{version}-{arch}-{os}.tgz command todecompress the package. After the decompression, the executable binary fileascend-sdk-manager is generated.

    Installation DescriptionTo use easy installation tools, you must be the root user.

    If you use the easy installation to install the software, the software can beinstalled only in the default directory /usr/local/Ascend.

    Procedure

    Step 1 Log in to the installation environment as the root user.

    Step 2 Upload the development kit to any directory (for example, /home/install) in theinstallation environment.

    Step 3 Run the following command to install the development kit:

    /home/HwHiAiUser/ascend-sdk-manager app install /home/install dev --mode=auto --silent=y

    NO TE

    The command format is {sdk_path}/ascend-sdk-manager app install dir_path scene --mode=auto --silent=y. The following table describes the parameters.When the development kit Ascend-Toolkit-{version}-xxx-{gcc_version}.run is installedusing the easy installation tool in the x86 system, the silent installation option can only be--silent=n. After the installation is complete, restart the OS for the installation to takeeffect.

    Parameter Description

    {sdk_path} Directory of the binary file ascend-sdk-manager, for example, /home/HwHiAiUser.

    dir_path Full path of the installation package, for example, /home/install.

    scene Installation scenario. The current version supports the followingscenarios: dev (development environment), infer (inferenceoperating environment), and train (training operatingenvironment).The following packages can be installed in different scenarios.● dev: Ascend-Toolkit● infer: Ascend-NNRT, Ascend-Toolbox, NPU_Driver,

    NPU_Firmware● train: Ascend-NNAE, Ascend-Toolbox, Ascend-TFPlugin,

    NPU_Driver, NPU_Firmware

    mode The value is auto.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 14

  • Parameter Description

    silent Silent installation option, which is used to replace the interactionoption displayed during software package installation. If you entery, all interaction options are set to y. In the current version, only ycan be selected.

    ----End

    3.4.2 Installing the Development Kit (CLI)

    Prerequisites● Prepare for the installation by referring to 3.3 Preparations for Installation.

    ● Obtain the development kit Ascend-Toolkit-{version}-xxx-{gcc_version}.runby referring to 3.2 Obtaining Software Packages.

    Procedure

    Step 1 Log in to the installation environment as the installation user of the softwarepackage.

    Ensure that the installation user of the software package is the same as thedependency installation user in 3.3 Preparations for Installation.

    Step 2 Upload the obtained development kit to any directory (for example, /home/package) in the installation environment.

    Step 3 Go to the directory where the software package is stored.

    Step 4 Grant the execute permission on the software package.

    chmod +x *.run

    NO TE

    In the preceding command, *.run indicates the development kit Ascend-Toolkit-{version}-xxx-{gcc_version}.run. Replace it with the actual package name.

    Step 5 Run the following command to check the consistency and integrity of the softwarepackage installation file:

    ./*.run --check

    Step 6 Create a software installation path.

    ● If you need to specify the installation path, you need to create it first. Forexample, if the installation path is /home/work, run the mkdir -p /home/work command to create an installation path and then select the path toinstall the software.

    ● If you do not specify an installation path, the software is installed in thedefault path. Table 3-5 lists the default paths.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 15

  • Table 3-5 Software package installation paths

    Item Path

    Defaultinstallationpath of asoftwarepackage

    – root user: /usr/local/Ascend/${package_name}/{version}/{arch-linux-gccversion}

    – Non-root user: ${HOME}/Ascend/${package_name}/{version}/{arch-linux-gccversion}

    Installation logpath

    ${install_path}/${package_name}/{version}/{arch-linux-gccversion}/ascend_install.log

    Path forrecordinginformationsuch as thesoftwarepackageversion, CPUarchitecture,GCC version,and installationpath after theinstallation

    ${install_path}/${package_name}/{version}/{arch-linux-gccversion}/ascend-${package_name}_install.info

    Table 3-6 describes the variables in Table 3-5.

    Table 3-6 Variable description

    Variable Description

    ${package_name} Software package directory, which is named afterthe software package.

    {version} Version directory, which is named after the versionnumber of the software package.NOTE

    Multiple versions can be installed, which are differentiatedby version numbers.

    {arch-linux_gccversion}

    Architecture directory, which is named after thecombination of the CPU architecture, Linux branch,and GCC version of the software package.NOTE

    Multiple versions can be installed.

    ${HOME} Current user name.

    ${install_path} Software package installation path.

    Step 7 Install the software.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 16

  • ● If the installation path is specified, run the ./*.run --install --install-path= command to perform the installation.In the preceding command, indicates the specified installation path,for example, /home/work.

    ● If the installation path is not specified, run the ./*.run --install command toperform the installation.

    NO TE

    ● The development kits of multiple versions can be installed by different users in the samedevelopment environment. The users must be in the same group as the Driver runninguser. If the owner groups are different, add the users to the group of the Driver runninguser.

    ● If the installation is performed by the root user, do not to specify the installation pathin the directory of a non-root user. Otherwise, the root user file may be replaced by anon-root user for privilege escalation.

    ● The AICPU operator package in the development kit must be installed as the root user.If you perform the installation as a non-root user, the AICPU operator package(Ascend310-aicpu_kernels-{version}.run) will be automatically decompressed to the ${install_path}/ascend-toolkit/{version}/xxx-linux_gccx.x.x directory during theinstallation. You need to add sudo before the following command or switch to the rootuser to install the operator package separately. Go to the ${install_path}/ascend-toolkit/{version}/xxx-linux_gccx.x.x directory and run the following command toperform the installation:./Ascend310-aicpu_kernels-{version}.run --full

    The AICPU does not support the specified installation path and shares the installationpath of the driver.

    ● The --quiet option is not supported when the development kit Ascend-Toolkit-{version}-xxx-{gcc_version}.run is installed in an x86 system.If the following information is displayed during the installation of the development kitAscend-Toolkit-{version}-xxx-{gcc_version}.run in the x86 system, asking you whetherto perform a hot reset, enter n. After the installation is complete, restart the OS for thesetting to take effect. In the current version, only n is supported.The installation of aicpu_kernels needs to restart the device to take effect, do you want to hot_reset the device? [y/n] n

    For more installation modes, see 7.1 Parameters.

    If the following information is displayed, the software is successfully installed:[INFO] xxx install success[INFO] process end

    xxx indicates the name of the software package to be installed.

    ----End

    3.5 Development + Commissioning

    3.5.1 Installing the AI Accelerator Module Driver andFirmware

    Step 1 Check the system environment. For details, see "Checking the Environment" in theAtlas 200 AI Accelerator Module 1.0.7 Software Installation and MaintenanceGuide (Model 3000).

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 17

    https://support.huawei.com/enterprise/en/doc/EDOC1100151293/40e9bb67/checking-the-environmenthttps://support.huawei.com/enterprise/en/doc/EDOC1100151293/40e9bb67/checking-the-environment

  • Step 2 Install the driver and firmware. For details, see "Installing the Driver and Firmwareon the Host" in the Atlas 200 AI Accelerator Module 1.0.7 Software Installationand Maintenance Guide (Model 3000).

    ----End

    3.5.2 Installing the Development Kit (Easy Installation Tool)Use an easy installation tool to install the development environment.

    Prerequisites● Prepare for the installation by referring to 3.3 Preparations for Installation.

    ● Obtain the development kit Ascend-Toolkit-{version}-xxx-{gcc_version}.runby referring to 3.2 Obtaining Software Packages.

    Obtaining an Easy Installation Tool

    Download the easy installation tool ascend-sdk-manager-{version}-{arch}-{os}.tgz based on your OS architecture and upload the tool to any directory onthe server, for example, /home/HwHiAiUser.

    Run the tar -xzvf ascend-sdk-manager-{version}-{arch}-{os}.tgz command todecompress the package. After the decompression, the executable binary fileascend-sdk-manager is generated.

    Installation Description

    To use easy installation tools, you must be the root user.

    If you use the easy installation to install the software, the software can beinstalled only in the default directory /usr/local/Ascend.

    Procedure

    Step 1 Log in to the installation environment as the root user.

    Step 2 Upload the development kit to any directory (for example, /home/install) in theinstallation environment.

    Step 3 Run the following command to install the development kit:

    /home/HwHiAiUser/ascend-sdk-manager app install /home/install dev --mode=auto --silent=y

    NO TE

    The command format is {sdk_path}/ascend-sdk-manager app install dir_path scene --mode=auto --silent=y. The following table describes the parameters.

    When the development kit Ascend-Toolkit-{version}-xxx-{gcc_version}.run is installedusing the easy installation tool in the x86 system, the silent installation option can only be--silent=n. After the installation is complete, restart the OS for the installation to takeeffect.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 18

    https://support.huawei.com/enterprise/en/doc/EDOC1100151293/d056a6f6/installing-the-driver-and-firmware-on-the-hosthttps://support.huawei.com/enterprise/en/doc/EDOC1100151293/d056a6f6/installing-the-driver-and-firmware-on-the-host

  • Parameter Description

    {sdk_path} Directory of the binary file ascend-sdk-manager, for example, /home/HwHiAiUser.

    dir_path Full path of the installation package, for example, /home/install.

    scene Installation scenario. The current version supports the followingscenarios: dev (development environment), infer (inferenceoperating environment), and train (training operatingenvironment).The following packages can be installed in different scenarios.● dev: Ascend-Toolkit● infer: Ascend-NNRT, Ascend-Toolbox, NPU_Driver,

    NPU_Firmware● train: Ascend-NNAE, Ascend-Toolbox, Ascend-TFPlugin,

    NPU_Driver, NPU_Firmware

    mode The value is auto.

    silent Silent installation option, which is used to replace the interactionoption displayed during software package installation. If you entery, all interaction options are set to y. In the current version, only ycan be selected.

    ----End

    3.5.3 Installing the Development Kit (CLI)

    Prerequisites● Prepare for the installation by referring to 3.3 Preparations for Installation.● Obtain the development kit Ascend-Toolkit-{version}-xxx-{gcc_version}.run

    by referring to 3.2 Obtaining Software Packages.

    Procedure

    Step 1 Log in to the installation environment as the installation user of the softwarepackage.

    Ensure that the installation user of the software package is the same as thedependency installation user in 3.3 Preparations for Installation.

    Step 2 Upload the obtained development kit to any directory (for example, /home/package) in the installation environment.

    Step 3 Go to the directory where the software package is stored.

    Step 4 Grant the execute permission on the software package.

    chmod +x *.run

    In the preceding command, * indicates the development kit name. Replace it withthe actual package name.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 19

  • Step 5 Run the following command to check the consistency and integrity of the softwarepackage installation file:

    ./*.run --check

    Step 6 Create a software installation path.● If you need to specify the installation path, you need to create it first. For

    example, if the installation path is /home/work, run the mkdir -p /home/work command to create an installation path and then select the path toinstall the software.

    ● If you do not specify an installation path, the software is installed in thedefault path. Table 3-7 lists the default paths.

    Table 3-7 Software package installation paths

    Item Path

    Defaultinstallationpath of asoftwarepackage

    – root user: /usr/local/Ascend/${package_name}/{version}/{arch-linux-gccversion}

    – Non-root user: ${HOME}/Ascend/${package_name}/{version}/{arch-linux-gccversion}

    Installation logpath

    ${install_path}/${package_name}/{version}/{arch-linux-gccversion}/ascend_install.log

    Path forrecordinginformationsuch as thesoftwarepackageversion, CPUarchitecture,GCC version,and installationpath after theinstallation

    ${install_path}/${package_name}/{version}/{arch-linux-gccversion}/ascend-${package_name}_install.info

    Table 3-8 describes the variables in Table 3-7.

    Table 3-8 Variable description

    Variable Description

    ${package_name} Software package directory, which is named afterthe software package.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 20

  • Variable Description

    {version} Version directory, which is named after the versionnumber of the software package.NOTE

    Multiple versions can be installed, which are differentiatedby version numbers.

    {arch-linux_gccversion}

    Architecture directory, which is named after thecombination of the CPU architecture, Linux branch,and GCC version of the software package.NOTE

    Multiple versions can be installed.

    ${HOME} Current user name.

    ${install_path} Installation path of the software package.

    Step 7 Install the software.● If the installation path is specified, run the ./*.run --install --install-

    path= command to perform the installation.In the preceding command, indicates the specified installation path,for example, /home/work.

    ● If the installation path is not specified, run the ./*.run --install command toperform the installation.

    NO TE

    ● The development kits of multiple versions can be installed by different users in the samedevelopment environment. The users must be in the same group as the Driver runninguser. If the owner groups are different, add the users to the group of the Driver runninguser.

    ● If the installation is performed by the root user, do not to specify the installation pathin the directory of a non-root user. Otherwise, the root user file may be replaced by anon-root user for privilege escalation.

    ● The AICPU operator package in the development kit must be installed as the root user.If you perform the installation as a non-root user, the AICPU operator package(Ascend310-aicpu_kernels-{version}.run) will be automatically decompressed to the ${install_path}/ascend-toolkit/{version}/xxx-linux_gccx.x.x directory during theinstallation. You need to add sudo before the following command or switch to the rootuser to install the operator package separately. Go to the ${install_path}/ascend-toolkit/{version}/xxx-linux_gccx.x.x directory and run the following command toperform the installation:./Ascend310-aicpu_kernels-{version}.run --full

    The AICPU does not support the specified installation path and shares the installationpath of the driver.

    ● The --quiet option is not supported when the development kit Ascend-Toolkit-{version}-xxx-{gcc_version}.run is installed in an x86 system.If the following information is displayed during the installation of the development kitAscend-Toolkit-{version}-xxx-{gcc_version}.run in the x86 system, asking you whetherto perform a hot reset, enter n. After the installation is complete, restart the OS for thesetting to take effect. In the current version, only n is supported.The installation of aicpu_kernels needs to restart the device to take effect, do you want to hot_reset the device? [y/n] n

    For more installation modes, see 7.1 Parameters.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 21

  • If the following information is displayed, the software is successfully installed:[INFO] xxx install success[INFO] process end

    xxx indicates the name of the software package to be installed.

    ----End

    3.6 Verifying the Development EnvironmentFor details, see the steps of converting a model and compiling code in "ACLSample Description > Image Classification Based on Caffe ResNet-50 (IncludingVideo Decoding) > Compiling and Running Applications on the Host" in theApplication Software Development Guide.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 3 Installing the Development Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 22

  • 4 Installing the Operating Environment4.1 Obtaining Software Packages

    4.2 Installation on a Physical Machine

    4.1 Obtaining Software PackagesTo obtain the software package, perform the following steps:

    Step 1 Log in to the Resources page and select the corresponding product series andproduct model.

    Step 2 Obtain the software packages according to the OS type and GCC version. Fordetails, see Table 4-1.

    Table 4-1 Software packages

    Name SoftwarePackage

    OSArchitecture

    GCCVersion

    InstallationUser

    Description

    AIacceleratormoduledriverpackage

    A200-3000-NPU_Driver-{version}-X86_64-Ubuntu18.04.run

    UbuntuX86

    - Theinstallation usermust betherootuser,and therunningusermust beHwHiAiUser.HwHiAiUsermust becreated

    AI accelerator moduledriver.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 4 Installing the Operating Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 23

    https://www.huaweicloud.com/intl/en-us/ascend/doc

  • Name SoftwarePackage

    OSArchitecture

    GCCVersion

    InstallationUser

    Description

    AIacceleratormodulefirmwarepackage

    beforetheinference carddriverandfirmware areinstalled.

    A200-3000-NPU_Firmware-{version}.run

    AI accelerator modulefirmware.

    Offlineinferenceenginepackage

    Ascend-NNRT-{version}-x86_64-linux_gcc7.3.0.run

    UbuntuX86

    7.3.0 root ornon-root. Iftheinstallation useris anon-rootuser,theownergroupof theinstallation usermust bethesame asthat ofthedriveroperating userHwHiAiUser.

    It contains the ACLlibrary ACLlib, which isused for modelinference ofapplications.

    Toolbox

    Ascend-Toolbox-{version}-x86_64-linux_gcc7.3.0.run

    UbuntuX86

    7.3.0 It contains AICPUoperators, which areused for inferencemodel calling.

    Easyinstallationtool

    ascend-sdk-manager-{version}-x86-ubuntu.tgz

    UbuntuX86

    - root Use an easyinstallation tool toinstall thedevelopmentenvironment.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 4 Installing the Operating Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 24

  • NO TE

    {version} indicates the software version, and {os} indicates the OS. Obtain the softwarepackage based on the GCC version planned or deployed onsite. You can run the gcc --version command on the OS to query the GCC version. If the GCC version is earlier than7.3.0, obtain the GCC 4.8.5 software package, if the GCC version is 7.3.0 or later, obtain theGCC 7.3.0 software package. The GCC versions of the software packages installed in thedevelopment environment and operating environment must be the same. Otherwise, theapplications compiled in the development environment fail to run in the operatingenvironment.

    ----End

    4.2 Installation on a Physical Machine

    4.2.1 Preparations for InstallationTable 4-2 lists the users for installing and running the driver, firmware, and CANNsoftware.

    Table 4-2 Installation and running user list

    PackageType

    Installation User Running User

    Driver andfirmwareinstallationpackage

    The user must be root. The value must be HwHiAiUser, andHwHiAiUser must be created beforethe driver and firmware are installed.

    CANNsoftwarepackage

    The user can be root ornon-root. For details, seethe following contentbelow the table.

    The user must be a non-root user. Fordetails, see Creating Installation andRunning Users.

    Checking the umask of the root User1. Log in to the installation environment as the root user.2. Check the umask value of the root user.

    umask

    3. If the umask value is not 0022, append "umask 0022" to the file and save thefile:vi ~/.bashrcsource ~/.bashrc

    Creating Installation and Running UsersIn addition to converting model files, developing and compiling applications, anddeveloping operators, if you need to debug applications in the developmentenvironment (for example, debugging image classification applications), you needto configure the Ascend AI device in the development environment. In this case,

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 4 Installing the Operating Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 25

  • you need to install the driver and firmware of the Ascend AI device. Table 4-3 liststhe users for installing and running the firmware and CANN software.

    Table 4-3 Installation and running user list

    PackageType

    Installation User Running User

    Driver andfirmwareinstallationpackage

    The user must be root. The value must be HwHiAiUser, andHwHiAiUser must be created beforethe inference card driver and firmwareare installed.

    CANNsoftwarepackage

    The user can be root ornon-root. For details, seethe following contentbelow the table.

    The user must be a non-root user. Fordetails, see the following contentbelow the table.

    You must create the HwHiAiUser user before installing the CANN software as theroot user or a non-root user.

    1. Create the HwHiAiUser user.Switch to the root user and run the following command to create theHwHiAiUser user:groupadd HwHiAiUser //Create the HwHiAiUser user group.useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser //Create the HwHiAiUser user whose owner group is HwHiAiUser.

    The user group of the HwHiAiUser user must be HwHiAiUser.2. Select an installation mode.

    – For installation as the root user:You can install the software as the root user, but you must create theHwHiAiUser user. After the CANN software is installed, you must run thesoftware as a non-root user, that is, the running user can only be in theHwHiAiUser user group.

    – For installation as a non-root user:In this scenario, the installation and running users must be the same.

    ▪ If a non-root user exists, add the user to the HwHiAiUser user groupand switch to the user for normal installation. The defaultinstallation user and running user are the current user.

    ▪ If you want to use a new non-root user, you need to create the userfirst.

    To create a non-root user, run the following commands as the root user:

    a. Create a non-root user.useradd -g HwHiAiUser -d /home/username -m username

    username is user-defined, but its owner group must be HwHiAiUser.b. Set the password of the non-root user.

    passwd username

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 4 Installing the Operating Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 26

  • NO TE

    ● The created running user cannot belong to the root user group.● After the HwHiAiUser user is created, do not disable the login authentication function

    of the user.● The password validity period is 90 days. You can change the validity period in the /etc/

    login.defs file or using the chage command. For details, see 5.6 Setting User AccountValidity Period.

    4.2.2 Installing the Operating Environment (Easy InstallationTool)

    You can use the one-click installation function to install the inference card driver,firmware, offline inference engine, and utility tool package.

    Prerequisites● Prepare for the installation by referring to 4.2.1 Preparations for Installation.● Check the system environment. For details, see "Checking the Environment

    Against System Requirements" or "Checking the Environment" in the Atlas200 AI Accelerator Module 1.0.7 Software Installation and MaintenanceGuide (Model 3000).

    ● Obtain the driver package A200-3000-NPU_Driver-{version}-xxx-xxx.run,firmware package A200-3000-NPU_Firmware-{version}.run, offline inferenceengine package Ascend-NNRT-{version}-xxx-{gcc_version}.run, and Toolboxpackage Ascend-Toolbox-{version}-xxx-{gcc_version}.run by referring to 4.1Obtaining Software Packages.

    Obtaining an Easy Installation ToolDownload the easy installation tool ascend-sdk-manager-{version}-{arch}-{os}.tgz based on your OS architecture and upload the tool to any directory onthe server, for example, /home/HwHiAiUser.

    Run the tar -xzvf ascend-sdk-manager-{version}-{arch}-{os}.tgz command todecompress the package. After the decompression, the executable binary fileascend-sdk-manager is generated.

    Installation DescriptionTo use easy installation tools, you must be the root user.

    If you use the easy installation to install the software, the software can beinstalled only in the default directory /usr/local/Ascend.

    Procedure

    Step 1 Log in to the installation environment as the root user.

    Step 2 Upload the driver, firmware, offline inference engine, and toolbox to any path (forexample, /home/install) in the installation environment.

    Step 3 Run the following commands to install the inference card driver, firmware, offlineinference engine, and toolbox:

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 4 Installing the Operating Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 27

    https://support.huawei.com/enterprise/en/doc/EDOC1100151293/40e9bb67/checking-the-environmenthttps://support.huawei.com/enterprise/en/doc/EDOC1100151293/40e9bb67/checking-the-environmenthttps://support.huawei.com/enterprise/en/doc/EDOC1100151293/40e9bb67/checking-the-environment

  • /home/HwHiAiUser/ascend-sdk-manager app install /home/install infer --mode=auto --silent=y

    NO TE

    The command format is {sdk_path}/ascend-sdk-manager app install dir_path scene --mode=auto --silent=y. The following table describes the parameters.

    Parameter Description

    {sdk_path} Directory of the binary file ascend-sdk-manager, for example, /home/HwHiAiUser.

    dir_path Full path of the installation package, for example, /home/install.

    scene Installation scenario. The current version supports the followingscenarios: dev (development environment), infer (inferenceoperating environment), and train (training operatingenvironment).The following packages can be installed in different scenarios.● dev: Ascend-Toolkit● infer: Ascend-NNRT, Ascend-Toolbox, NPU_Driver,

    NPU_Firmware● train: Ascend-NNAE, Ascend-Toolbox, Ascend-TFPlugin,

    NPU_Driver, NPU_Firmware

    mode The value is auto.

    silent Silent installation option, which is used to replace the interactionoption displayed during software package installation. If you entery, all interaction options are set to y. In the current version, only ycan be selected.

    CA UTION

    If a software package of an earlier version already exists in the installationenvironment, when you use the easy installation tool to install a software packageof a later version in silent mode (that is, add --silent=y to the installationcommand), when you install the toolbox, the Aicpu_kernels subpackage mayhave been installed and the installation is skipped. The details are as follows:Aicpu_kernels package has been installed on the path /usr/local/Ascend, the version is 1.73.T5.0.B050, and the version of this package is 1.73.T5.1.B050do you want to continue installing? [y/n]stop installation!Install aicpu_kernels end: 2020-07-10 15:07:19[Toolbox] [20200710-15:07:19] [INFO] Ascend910-aicpu_kernels-1.73.t5.1.b050.run --full install success[Toolbox] [20200710-15:07:19] [INFO] Ascend-Toolbox-20.0.0.B036-arm64-linux_gcc7.3.0.run install success

    In the preceding example, the later version 1.73.T5.1.B050 is not installed. In theactual environment, the earlier version 1.73.T5.0.B050 is still used. If you want touse the later aicpu version, you are advised to upgrade the toolbox separately. Fordetails, see 5.4 Upgrading the CANN Software (CLI).

    ----End

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 4 Installing the Operating Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 28

  • 4.2.3 Installing the Operating Environment (CLI)

    4.2.3.1 Installing the AI Accelerator Module Driver and Firmware

    Step 1 Check the system environment. For details, see "Checking the Environment" in theAtlas 200 AI Accelerator Module 1.0.7 Software Installation and MaintenanceGuide (Model 3000).

    Step 2 Install the driver and firmware. For details, see "Installing the Driver and Firmwareon the Host" in the Atlas 200 AI Accelerator Module 1.0.7 Software Installationand Maintenance Guide (Model 3000).

    ----End

    4.2.3.2 Installing the Inference Software

    Procedure

    Obtain and install the offline inference engine package and utility tool package.The installation sequence is not required and the installation procedures are thesame. The detailed installation procedure is as follows:

    Step 1 Log in to the installation environment as the installation user of the softwarepackage.

    Step 2 Upload the offline inference engine package and utility kit obtained to any path(for example, /home/package) in the installation environment.

    Step 3 Go to the directory where the software package is stored.

    Step 4 Grant the execute permission on the software package.

    chmod +x *.run

    In the preceding command, * indicates the software package name. Replace it withthe actual package name.

    Step 5 Run the following command to check the consistency and integrity of the softwarepackage installation file:

    ./*.run --check

    Step 6 Create a software installation path.

    ● If you need to specify the installation path, you need to create it first. Forexample, if the installation path is /home/work, run the mkdir -p /home/work command to create an installation path and then select the path toinstall the software.

    ● If you do not specify an installation path, the software is installed in thedefault path. Table 4-4 lists the default paths.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 4 Installing the Operating Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 29

    https://support.huawei.com/enterprise/en/doc/EDOC1100151293/40e9bb67/checking-the-environmenthttps://support.huawei.com/enterprise/en/doc/EDOC1100151293/40e9bb67/checking-the-environmenthttps://support.huawei.com/enterprise/en/doc/EDOC1100151293/d056a6f6/installing-the-driver-and-firmware-on-the-hosthttps://support.huawei.com/enterprise/en/doc/EDOC1100151293/d056a6f6/installing-the-driver-and-firmware-on-the-host

  • Table 4-4 Software package installation paths

    Item Path

    Defaultinstallationpath of asoftwarepackage

    – root user: /usr/local/Ascend/${package_name}/{version}/{arch-linux-gccversion}

    – Non-root user: ${HOME}/Ascend/${package_name}/{version}/{arch-linux-gccversion}

    Installation logpath

    ${install_path}/${package_name}/{version}/{arch-linux-gccversion}/ascend_install.log

    Path forrecordinginformationsuch as thesoftwarepackageversion, CPUarchitecture,GCC version,and installationpath after theinstallation

    ${install_path}/${package_name}/{version}/{arch-linux-gccversion}/ascend-${package_name}_install.info

    Table 4-5 describes the variables in Table 4-4.

    Table 4-5 Variable description

    Variable Description

    ${package_name} Software package directory, which is named after thesoftware package.

    {version} Version directory, which is named after the versionnumber of the software package.NOTE

    Multiple versions can be installed, which are differentiatedby version numbers.

    {arch-linux_gccversion}

    Architecture directory, which is named after thecombination of the CPU architecture, Linux branch,and GCC version of the software package.NOTE

    Multiple versions can be installed.

    ${HOME} Current user name.

    ${install_path} Installation path of the software package.

    Step 7 Install the software.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 4 Installing the Operating Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 30

  • ● If the installation path is specified, run the./*.run --install --install-path= command to perform the installation.In the preceding command, indicates the specified installation path,for example, /home/work.

    ● If the installation path is not specified, run the ./*.run --install command toperform the installation.

    NO TE

    ● The offline inference engine package and utility kit can be installed by different users inthe same operating environment. However, for different users, the installed versionsmust be the same, and users must be in the same group as the Driver running user.Otherwise, add the users to the group of the Driver running user.

    ● The AICPU operator package in the Toolbox must be installed as the root user. If youperform the installation as a non-root user, the AICPU operator package (Ascend310-aicpu_kernels-{version}.run) will be automatically decompressed to the ${install_path}/toolbox/{version}/xxx-linux_gccx.x.x directory during the installation.You need to add sudo before the following command or switch to the root user toinstall the operator package separately. Go to the ${install_path}/toolbox/{version}/xxx-linux_gccx.x.x directory and run the following command to perform theinstallation:./Ascend310-aicpu_kernels-{version}.run --full

    The AICPU does not support the specified installation path and shares the installationpath of the driver.

    ● The --quiet option is not supported when the Toolbox Ascend-Toolbox-{version}-xxx-{gcc_version}.run is installed in an x86 system.

    ● If the following information is displayed during the installation of the Toolbox Ascend-Toolbox-{version}-xxx-{gcc_version}.run in the x86 system, asking you whether toperform a hot reset, enter n. After the installation is complete, restart the OS for thesetting to take effect. In the current version, only n is supported.The installation of aicpu_kernels needs to restart the device to take effect, do you want to hot_reset the device? [y/n] n

    For more installation modes, see 7.1 Parameters.

    If the following information is displayed, the software is successfully installed:[INFO] xxx install success[INFO] process end

    xxx indicates the name of the software package to be installed.

    ----End

    4.2.4 Verifying the Operating EnvironmentFor details, see the step of running an application in "ACL Sample Description >Image Classification Based on Caffe ResNet-50 (Including Video Decoding) >Compiling and Running Applications on the Host" in the Application SoftwareDevelopment Guide.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 4 Installing the Operating Environment

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 31

  • 5 Common Operations5.1 Configuring the NIC IP Address

    5.2 Uninstalling the Ascend Chip Driver Firmware and Inference Software (EasyInstallation Tool)

    5.3 Upgrading the Ascend Chip Driver Firmware and Inference Software (EasyInstallation Tool)

    5.4 Upgrading the CANN Software (CLI)

    5.5 Uninstalling the CANN Software (CLI)

    5.6 Setting User Account Validity Period

    5.1 Configuring the NIC IP AddressAfter the OS is installed, you need to configure the IP address of the NIC on theiBMC remote management page to remotely connect to the server. Theconfiguration method is as follows.

    Configuring the NIC IP Address on CentOS/BC_Linux

    Step 1 Log in to the OS as the root user.

    Step 2 Go to the configuration file of the NIC for which an IP address needs to beconfigured. NIC enp2s0f0 is used as an example. The NIC and path vary dependingon the site requirements.

    vi /etc/sysconfig/network-scripts/ifcfg-enp2s0f0

    Step 3 Configure the service IP address, subnet mask, and gateway of the correspondingNIC, as shown in Figure 5-1.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 5 Common Operations

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 32

  • Figure 5-1 Setting network parameters

    NO TE

    ● BOOTPROTO indicates the IP address type of the device. For a static IP address, set thisparameter to static or none. For a dynamic IP address, set this parameter to dhcp sothat the IP address can be obtained automatically.

    ● Set ONBOOT to yes to enable automatic network connection.

    ● PREFIX indicates the network bit. If the value is 22, the subnet mask is 255.255.252.0.

    Step 4 Restart the network service.

    service network restart

    Step 5 Check whether the IP address is configured successful.

    ifconfig

    Step 6 Run the following command to check the service status:systemctl status NetworkManager

    If the command output is disabled, run the following command to enableNetworkManager automatic startup:

    systemctl enable NetworkManager

    Check the service status again. If the command output is enabled, theconfiguration is successful.

    ----End

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 5 Common Operations

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 33

  • Configuring the NIC IP Address on Debian

    Step 1 Log in to the OS as the root user.

    Step 2 Go to the configuration file of the NIC. NIC eno1 is used as an example. The NICand path vary depending on the site requirements.

    vi /etc/network/interfaces

    Step 3 Configure the service IP address, subnet mask, and gateway of the correspondingNIC, as shown in Figure 5-2.

    Figure 5-2 Configuring the IP address

    Step 4 Restart the network service.

    service network restart

    Step 5 Check whether the IP address is configured successful.

    ifconfig

    ----End

    5.2 Uninstalling the Ascend Chip Driver Firmware andInference Software (Easy Installation Tool)

    Uninstallation Description● If you only need to uninstall the specified software package, inference engine

    package, development kit, or Toolbox, you can uninstall them in anysequence. However, if you want to uninstall the Ascend chip driver andfirmware, you need to uninstall other software packages and then uninstallthe driver and firmware. There is no sequence requirement for uninstallingthe driver and firmware.

    ● If you use the one-click uninstallation function to uninstall all softwarepackages, you do not need to consider the sequence.

    Uninstalling a Specified Software Package

    Step 1 Log in to the environment as user root.

    Step 2 Run the following commands to uninstall a specified component. For details aboutrelated parameters, see Table 5-1.

    ./ascend-sdk-manager app uninstall shortname --version=version --gcc_type=gcc_version --silent=y or

    ./ascend-sdk-manager app uninstall shortname version gcc_type y

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 5 Common Operations

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 34

  • Table 5-1 Parameter description

    Parameter

    Description

    shortname

    Component short name, for example, 'driver', 'firmware', 'nnae','nnrt', 'toolbox', 'tfplugin', 'toolkit'. When auto is entered, allcomponents are uninstalled in one-click mode.

    version Component version. You can run the ./ascend-sdk-manager appdisplay command to query the version information as required.

    gcc_type

    GCC version. You can run the ./ascend-sdk-manager app displaycommand to query the GCC version as required.

    silent Silent uninstallation. Enter y or n to replace y or n that the systemrequires during the uninstallation.

    ----End

    One-click Uninstallation

    Step 1 Log in to the environment as user root.

    Step 2 Run the following command to uninstall all software packages in one-click mode.For details about related parameters, see Table 5-1.

    ./ascend-sdk-manager app uninstall auto --silent=y or

    ./ascend-sdk-manager app uninstall auto y

    ----End

    Uninstallation Example● Run the following commands to uninstall all versions of a specified

    component based on the component short names: ./ascend-sdk-manager app uninstall nnrt --silent=y [NNRT] [20200714-04:17:12] [INFO] Ascend-pyACL-20.0.0-aarch64-centos7.6.run uninstall start [NNRT] [20200714-04:17:12] [INFO] proces-------------------------------------------------- uninstall /usr/local/Ascend/nnrt/20.0.0.RC1/arm64-linux_gcc7.3.0 success [NNRT] [20200714-04:17:12] [INFO] Ascend-pyACL-20.0.0-aarch64-centos7.6.run uninstall start [NNRT] [20200714-04:17:13] [INFO] pro-------------------------------------------------- uninstall /usr/local/Ascend/nnrt/20.0.0.B036/arm64-linux_gcc7.3.0 success

    ● Run the following commands to uninstall all GCC components of the specifiedversion based on the component short names and versions: ./ascend-sdk-manager app uninstall toolbox --version=20.0.0.RC1 --silent=y [Toolbox] [20200713-19:16:08] [INFO] Ascend910-aicpu_kernels-1.73.5.1.b050.run uninstall start [Toolbox] [20200713-1-------------------------------------------------- uninstall /usr/local/Ascend/toolbox/20.0.0.RC1/arm64-linux_gcc7.3.0 success

    ● Run the following commands to uninstall the GCC component of the specifiedversion based on the component short names, versions, and GCC version: ./ascend-sdk-manager app uninstall nnrt --version=20.0.0.RC1 --gcc_type=gcc7.3.0 --silent=y [NNRT] [20200714-04:09:02] [INFO] Ascend-pyACL-20.0.0-aarch64-centos7.6.run uninstall start [NNRT] [20200714-04:09:03] [INFO] p-------------------------------------------------- uninstall /usr/local/Ascend/nnrt/20.0.0.RC1/arm64-linux_gcc7.3.0 success

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 5 Common Operations

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 35

  • 5.3 Upgrading the Ascend Chip Driver Firmware andInference Software (Easy Installation Tool)

    Upgrade Description● Before upgrading the CANN software, you need to upgrade the Ascend chip

    firmware and driver to ensure that the CANN software matches the Ascendchip firmware and driver versions.

    ● Upgrade the Ascend chip firmware first, and then the driver.

    Upgrading a Specified Software Package

    Step 1 Log in to the environment as user root.

    Step 2 Run the following commands to update a specified component based on file_pathin the installation package. For details about related parameters, see Table 5-2.

    ./ascend-sdk-manager app upgrade file_path --install_path=install_path --silent=y or

    ./ascend-sdk-manager app upgrade file_path install_path y

    Table 5-2 Parameter description

    Parameter Description

    file_path Complete path of the installation package.

    install_path

    Installation path of the target version.

    silent Silent upgrade. Enter y or n to replace y or n that the systemrequires during the upgrade as required.

    ----End

    Upgrade ExampleThe following is an example of upgrading the TFPlugin software package:

    ./ascend-sdk-manager app upgrade ./Ascend-NNRT-20.0.0.B036-x86_64-linux_gcc4.8.5.run --install_path=/usr/local/Ascend/nnrt/20.0.0.B035 -- silent=y [NNRT] [20200709-15:56:35] [INFO] Ascend-pyACL-20.0.0-x86_64-centos7.6.run uninstall start [NNRT] [20200709-15:56:35] [INFO] rm soft link pyACL_linux.x86_64 [NNRT] [20200709-15:56:35] [INFO] Ascend-acllib-1.73.t5.0.b050-centos7.6.x86_64.run uninstall start ... -------------------------------------------------- upgrade /home/baiyunrui/pkg/b36/Ascend-NNRT-20.0.0.B036-x86_64-linux_gcc4.8.5.run success

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 5 Common Operations

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 36

  • 5.4 Upgrading the CANN Software (CLI)NO TE

    After the software package is upgraded, services are not affected.

    Step 1 Log in to the installation environment as the installation user of the softwarepackage.

    Step 2 Upgrade the software.● If you specify a path when installing the software package, run the /*.run --upgrade --install-path= to upgrade the softwarepackage.In the preceding command, indicates the directory wherethe software package is stored, indicates the software packageinstallation directory specified by the user, and * indicates the softwarepackage name. Replace them with the actual ones.For example, if the software package is stored in /home/package and thesoftware package installation directory is /home/work, run the followingcommand:/home/package/*.run --upgrade --install-path=/home/work

    ● If you do not specify a path when installing the software package, run the/*.run --upgrade command to upgrade the softwarepackage.For example, if the software package is stored in the /home/packagedirectory, run the following command:/home/package/*.run --upgrade

    ----End

    5.5 Uninstalling the CANN Software (CLI)If you uninstall only the inference engine, development kit, or Toolbox, you canuninstall them in any sequence. However, if you also need to uninstall theinference card driver, you need to uninstall other software packages beforeuninstalling the driver.

    UninstallationTo uninstall an installed software package, perform the following steps:

    Step 1 Log in to the installation environment as the installation user of the softwarepackage.

    Step 2 Uninstall the software package.● If you specify a path when installing the software package, run the /*.run --uninstall --install-path= to uninstall the softwarepackage.In the preceding command, indicates the directory wherethe software package is stored, and indicates the specified software

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 5 Common Operations

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 37

  • package installation directory. In the preceding command, * indicates thesoftware package name. Replace it with the actual package name.

    For example, if the software package is stored in /home/package and thesoftware package installation directory is /home/work, run the followingcommand:

    /home/package/*.run --uninstall --install-path=/home/work

    ● If you do not specify a path when installing the software package, run the/*.run --uninstall command to uninstall the softwarepackage.

    For example, if the software package is stored in the /home/packagedirectory, run the following command:

    /home/package/*.run --uninstall

    If the following information is displayed, the software is successfully uninstalled:[INFO] xxx uninstall success[INFO] process end

    xxx indicates the name of the software package to be uninstalled.

    ----End

    Uninstallation Using a Script

    You can also use the uninstallation script to uninstall the. The following describeshow to uninstall the development suite package.

    Step 1 Go to the directory where the uninstallation script of the software is stored.Generally, the script is stored in the script directory.

    cd {package-path}/ascend-toolkit/20.0.0.xxx/xxx-linux_gccx.x.x/script

    {path} indicates the tool installation directory. If the software package is installedin a specified directory, replace it with the specified directory. If this parameter isnot specified, the default directory is used. Replace it by referring to Table 3-5.

    20.0.0.xxx indicates the software package version, and xxx-linux_gccx.x.xindicates the OS architecture and GCC version. Replace them as required.

    Step 2 Run the ./uninstall.sh command to run the script.

    ----End

    5.6 Setting User Account Validity PeriodRun the chage command to set the validity period of a user account for securitypurposes.

    Command:

    chage [-m mindays] [-M maxdays] [-d lastday] [-I inactive] [-E expiredate] [-W warndays] user

    Table 5-3 describes the parameters.

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 5 Common Operations

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 38

  • Table 5-3 Parameters description

    Parameter Description

    -m Minimum time (in days) for which the password must be used.The password cannot be changed during this period. The value0 indicates that the password can be changed at any time.

    -M Maximum validity period (days) of a password. The value 1indicates that the validity check of the password can bedisabled.

    -d Last password change date.

    -I Maximum idle period (in days) after which the user accountwill be disabled. After the specified time period has expired, thepassword will be invalid.

    -E Date when the user account expires. The user account isunavailable when the account validity period has expired.

    -W Number of days in advance users are notified that theirpasswords are about to expire.

    -l Lists the current settings. It helps non-privileged users todetermine the time when their passwords or accounts expire.

    NO TE

    ● Table 5-3 lists only common parameters. You can run the chage --help command todisplay detailed parameter description.

    ● The date is in the format of YYYY-MM-DD. For example, chage -E 2020-12-01 testindicates that the user account test will expire on December 1, 2020.

    ● User must be specified. Replace it with the actual user name. The default user name isroot.

    For example, to change the validity period of the test user to December 1, 2020,run the following command:

    chage -E 2020-12-01 test

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 5 Common Operations

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 39

  • 6 FAQs6.1 What Do I Do If the "Software Has Been Installed" During RUN PackageInstallation?

    6.2 pip3.7.5 install numpy Error

    6.3 The error message "subprocess.CalledProcessError: Command '('lsb_release', '-a')' return non-zero exit status 1 " is displayed during pip3.7.5 installation.

    6.4 What Do I Do If "Could not find a version that satisfies the requirement xxx" IsDisplayed When pip3.7.5 install Is Run?

    6.5 Installing CMake 3.5.2

    6.6 Configuring a System Network Proxy

    6.1 What Do I Do If the "Software Has Been Installed"During RUN Package Installation?

    SymptomThe following message is displayed during installation:

    run package is already installed, install failed

    SolutionThe software package cannot be installed repeatedly. You need to uninstall thesoftware package and then install it. For details, see 5.5 Uninstalling the CANNSoftware (CLI).

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 6 FAQs

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 40

  • 6.2 pip3.7.5 install numpy Error

    SymptomWhen you run the pip3.7.5 install numpy command to install the dependency, theerror message "Could not build wheels for numpy which use PEP 517 and cannotbe install directly" is displayed, as shown in the following figure.

    Possible CausesThe default gcc version installed in the CentOS system is too early. As a result, theNumPy fails to be installed.

    ProcedureRun the following commands to install virt-manager-common and virt-manager:

    export CFLAGS=-std=c99pip3.7 install numpy==1.17.2

    6.3 The error message "subprocess.CalledProcessError:Command '('lsb_release', '-a')' return non-zero exitstatus 1 " is displayed during pip3.7.5 installation.

    SymptomDuring dependency installation, the error message "subprocess.CalledProcessError:Command '('lsb_release', '-a')' return non-zero exit status 1 " is displayed whenyou run the pip3.7.5 install xxx command to install related software. The errormessage is as follows:

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 6 FAQs

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 41

  • Possible CausesWhen the subprocess module of Python 3.7.5 is executed, the system displays amessage indicating that the lsb_release.py module cannot be found when thelsb_release -a command is executed. The lib path of Python 3.7.5 is /usr/local/python3.7.5/lib/python3.7/. The lsb_release.py module does not exist in the path.Therefore, an error is reported.

    Procedure

    Step 1 Run the following command to search for the missing file lsb_release.py:find / -name lsb_release

    After the preceding command is executed, the following path is obtained. Thepath is only an example and may vary according to the actual situation./usr/bin/lsb_release

    Step 2 Run the following command to delete the /usr/bin/lsb_release file in Step 1:rm /usr/bin/lsb_release

    Step 3 Run the pip3.7.5 list command to check whether the fault is rectified.

    ----End

    6.4 What Do I Do If "Could not find a version thatsatisfies the requirement xxx" Is Displayed Whenpip3.7.5 install Is Run?

    SymptomWhat Do I Do If "Could not find a version that satisfies the requirement xxx" IsDisplayed When pip3.7.5 install Is Run?

    Atlas Intelligent Edge SolutionCANN Software Installation Guide (A200-3000) 6 FAQs

    Issue 01 (2021-02-08) Copyright © Huawei Technologies Co., Ltd. 42

  • Figure 6-1 Message displayed upon pip3 install

    Possible Causes

    The pip source is not configured.

    Procedure

    Configure the pip source as follows:

    Step 1 Run the following command as the installation user of the software package:cd ~/.pip

    If a message indicating that the directory does not exi