In order to ensure that the script can run normally on the Ascend 310/310P, environment variables need to be set before inference is executed.
## Check the installation path
If the root user is used to install the run package, the default path is '/usr/local/Ascend', and the default installation path for non-root users is '/home/HwHiAiUser/Ascend'.
Take the path of the root user as an example, set the environment variables as follows:
```bash
export ASCEND_HOME=/usr/local/Ascend # the root directory of run package
```
## Identify the run package version
The run package is divided into two versions according to whether the 'ascend-toolkit' directory exists in the installation path.
If 'ascend-toolkit' directory exists, set the environment variables as follows: