---
title: 函数：get_cann_version
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_1019.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_1019.html
indexId: dee2f6b067e50d2f16e0f501548bb4f2d8d3b41cfa20987d1cfef27203b9aa7b71
---
# 函数：get_cann_version

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

查询CANN软件包版本号。


#### 函数原型

- C函数原型
  1 aclError aclsysGetCANNVersion(aclCANNPackageName name, aclCANNPackageVersion *version)

- python函数
  1 version, ret = acl.get_cann_version(name)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| name | int，指定要查询的软件包，具体请参见aclCANNPackageName。若指定要查询的软件包没有安装，则本接口返回报错，错误码100003。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| version | dict，CANN软件包版本号，具体请参见aclCANNPackageVersion。 |
| ret | int，返回0表示成功，返回其他值表示失败，请参见aclError。 |
