算法工具链安装出错

工具连软件安装报错:

1: 下载文件 wget -c ftp://xj3ftp@vrftp.horizon.ai/ai\_toolchain/ai\_toolchain.tar.gz --ftp-password=xj3ftp@123$%

wget -c ftp://xj3ftp@vrftp.horizon.ai/model\_convert\_sample/yolov5s\_v2.0.tar.gz --ftp-password=xj3ftp@123$%

2: 解压

3: 创建并激活

4: 安装 工具连软件

pip install ai_toolchain/h* -i https://mirrors.aliyun.com/pypi/simple

报错如下:

Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests==2.22.0->horizon-tc-ui==1.17.4)

Using cached https://mirrors.aliyun.com/pypi/packages/56/aa/4ef5aa67a9a62505db124a5cb5262332d1d4153462eb8fd89c9fa41e5d92/urllib3-1.25.11-py2.py3-none-any.whl (127 kB)

Collecting certifi>=2017.4.17 (from requests==2.22.0->horizon-tc-ui==1.17.4)

Using cached https://mirrors.aliyun.com/pypi/packages/4c/dd/2234eab22353ffc7d94e8d13177aaa050113286e93e7b40eae01fbf7c3d9/certifi-2023.7.22-py3-none-any.whl (158 kB)

Collecting contextlib2>=0.5.5 (from schema==0.7.2->horizon-tc-ui==1.17.4)

Using cached https://mirrors.aliyun.com/pypi/packages/76/56/6d6872f79d14c0cb02f1646cbb4592eef935857c0951a105874b7b62a0c3/contextlib2-21.6.0-py2.py3-none-any.whl (13 kB)

Requirement already satisfied: fonttools>=4.22.0 in /home/zmc/miniconda3/envs/horizon_bpu/lib/python3.8/site-packages (from matplotlib<=3.5.2->horizon-nn==0.18.2) (4.42.0)

Requirement already satisfied: packaging>=20.0 in /home/zmc/miniconda3/envs/horizon_bpu/lib/python3.8/site-packages (from matplotlib<=3.5.2->horizon-nn==0.18.2) (23.1)

Requirement already satisfied: pycparser in /home/zmc/miniconda3/envs/horizon_bpu/lib/python3.8/site-packages (from cffi>=1.12->cryptography==3.4.8->horizon-tc-ui==1.17.4) (2.21)

Building wheels for collected packages: pycocotools

Building wheel for pycocotools (setup.py) … error

error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.

│ exit code: 1

╰─> [43 lines of output]

/tmp/pip-install-fp48g10f/pycocotools_90fef4fece9947788d47dbfebcae73ed/setup.py:12: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

!!

********************************************************************************

Requirements should be satisfied by a PEP 517 installer.

If you are using pip, you can try `pip install --use-pep517`.

********************************************************************************

!!

dist.Distribution().fetch_build_eggs(setup_requires)

/home/zmc/miniconda3/envs/horizon_bpu/lib/python3.8/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

!!

********************************************************************************

Requirements should be satisfied by a PEP 517 installer.

If you are using pip, you can try `pip install --use-pep517`.

********************************************************************************

!!

dist.fetch_build_eggs(dist.setup_requires)

running bdist_wheel

running build

running build_py

creating build

creating build/lib.linux-x86_64-cpython-38

creating build/lib.linux-x86_64-cpython-38/pycocotools

copying pycocotools/__init__.py → build/lib.linux-x86_64-cpython-38/pycocotools

copying pycocotools/cocoeval.py → build/lib.linux-x86_64-cpython-38/pycocotools

copying pycocotools/mask.py → build/lib.linux-x86_64-cpython-38/pycocotools

copying pycocotools/coco.py → build/lib.linux-x86_64-cpython-38/pycocotools

running build_ext

Compiling pycocotools/_mask.pyx because it changed.

[1/1] Cythonizing pycocotools/_mask.pyx

/home/zmc/miniconda3/envs/horizon_bpu/lib/python3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive ‘language_level’ not set, using ‘3str’ for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-fp48g10f/pycocotools_90fef4fece9947788d47dbfebcae73ed/pycocotools/_mask.pyx

tree = Parsing.p_module(s, pxd, full_module_name)

building ‘pycocotools._mask’ extension

creating build/common

creating build/temp.linux-x86_64-cpython-38

creating build/temp.linux-x86_64-cpython-38/common

creating build/temp.linux-x86_64-cpython-38/pycocotools

gcc -pthread -B /home/zmc/miniconda3/envs/horizon_bpu/compiler_compat -Wl,–sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/zmc/miniconda3/envs/horizon_bpu/lib/python3.8/site-packages/numpy/core/include -I./common -I/home/zmc/miniconda3/envs/horizon_bpu/include/python3.8 -c ../common/maskApi.c -o build/temp.linux-x86_64-cpython-38/../common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99

gcc: error: ../common/maskApi.c: No such file or directory

error: command ‘/usr/bin/gcc’ failed with exit code 1

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for pycocotools

Running setup.py clean for pycocotools

Failed to build pycocotools

在horizon_tc_ui-1.17.4-cp38-cp38-linux_x86_64.whl/horizon_tc_ui-1.17.4.dist-info/METADATA里面修改下列信息

建议先修改pycocotools如果编译还是出问题在改pyyaml,然后就可以编译了

可以了,谢谢.