安装开发版本时出现CVAT错误



我正试图根据官方指示安装CVAT的开发版本,但在要求。txt应用的步骤中挣扎:

pip install -r cvat/requirements/development.txt

…出现以下错误:

Skipping wheel build for av, due to binaries being disabled for it.
Skipping wheel build for datumaro, due to binaries being disabled for it.
Installing collected packages: wrapt, tf-estimator-nightly, termcolor, tensorboard-plugin-wit, Shapely, rules, rope, rjsmin, rcssmin, pytz, pyasn1, patool, mistune, mccabe, libclang, keras, itypes, flatbuffers, entrypoint2, EasyProcess, dj-pagination, diskcache, av, addict, Werkzeug, urllib3, uritemplate, typing-extensions, tqdm, tornado, toml, threadpoolctl, tensorflow-io-gcs-filesystem, tensorboard-data-server, sqlparse, smmap, six, ruamel.yaml.clib, rsa, redis, PyYAML, pyunpack, pyrsistent, pyparsing, pylogbeat, pyjwt, Pygments, pycparser, pyasn1-modules, protobuf, Pillow, oauthlib, numpy, networkx, natsort, MarkupSafe, Markdown, lxml, lazy-object-proxy, kiwisolver, joblib, jmespath, isort, inflection, idna, google-crc32c, gast, fonttools, dnspython, django-extensions, deprecated, defusedxml, cycler, click, charset-normalizer, certifi, cachetools, attrs, asgiref, absl-py, tensorboardX, snakeviz, scipy, ruamel.yaml, rq, requests, python3-openid, python-ldap, python-dateutil, pdf2image, packaging, orderedmultidict, opt-einsum, opencv-python-headless, opencv-python, keras-preprocessing, jsonschema, jinja2, isodate, h5py, grpcio, googleapis-common-protos, google-resumable-media, google-pasta, google-auth, gitdb, Django, cffi, astunparse, astroid, scikit-learn, requests-oauthlib, pylint, pandas, matplotlib, limits, google-api-core, GitPython, furl, djangorestframework, django-sendfile2, django-rq, django-filter, django-cors-headers, django-auth-ldap, django-appconf, cryptography, croniter, coreschema, botocore, azure-core, s3transfer, rq-scheduler, python-logstash-async, pylint-plugin-utils, pycocotools, open3d, msrest, google-cloud-core, google-auth-oauthlib, drf-spectacular, django-rest-auth, django-compressor, coreapi, tensorboard, pylint-django, google-cloud-storage, django-allauth, datumaro, boto3, azure-storage-blob, tensorflow
Running setup.py install for av ... error
error: subprocess-exited-with-error

× Running setup.py install for av did not run successfully.
│ exit code: 1
╰─> [50 lines of output]
running install
/Users/dd/cvat/.env/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-12.4-x86_64-cpython-39
creating build/lib.macosx-12.4-x86_64-cpython-39/av
copying av/deprecation.py -> build/lib.macosx-12.4-x86_64-cpython-39/av
copying av/datasets.py -> build/lib.macosx-12.4-x86_64-cpython-39/av
copying av/__init__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av
copying av/__main__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av
creating build/lib.macosx-12.4-x86_64-cpython-39/av/video
copying av/video/__init__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av/video
creating build/lib.macosx-12.4-x86_64-cpython-39/av/codec
copying av/codec/__init__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av/codec
creating build/lib.macosx-12.4-x86_64-cpython-39/av/container
copying av/container/__init__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av/container
creating build/lib.macosx-12.4-x86_64-cpython-39/av/audio
copying av/audio/__init__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av/audio
creating build/lib.macosx-12.4-x86_64-cpython-39/av/subtitles
copying av/subtitles/__init__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av/subtitles
creating build/lib.macosx-12.4-x86_64-cpython-39/av/filter
copying av/filter/__init__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av/filter
creating build/lib.macosx-12.4-x86_64-cpython-39/av/sidedata
copying av/sidedata/__init__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av/sidedata
creating build/lib.macosx-12.4-x86_64-cpython-39/av/data
copying av/data/__init__.py -> build/lib.macosx-12.4-x86_64-cpython-39/av/data
running build_ext
running config
PyAV: 8.0.2 (unknown commit)
Python: 3.9.10 (main, Jun 28 2022, 17:49:16) n[Clang 13.1.6 (clang-1316.0.21.2.5)]
platform: macOS-12.4-x86_64-i386-64bit
extension_extra:
include_dirs: [b'include']
libraries: []
library_dirs: []
define_macros: []
runtime_library_dirs: []
config_macros:
PYAV_COMMIT_STR="unknown-commit"
PYAV_VERSION=8.0.2
PYAV_VERSION_STR="8.0.2"
Could not find libavformat with pkg-config.
Could not find libavcodec with pkg-config.
Could not find libavdevice with pkg-config.
Could not find libavutil with pkg-config.
Could not find libavfilter with pkg-config.
Could not find libswscale with pkg-config.
Could not find libswresample with pkg-config.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> av

我已经尝试了建议的修复,但没有运气:https://github.com/openvinotoolkit/cvat/issues/4406

环境:

  • MacBook Pro (Intel x64)
  • macOS Monterey (Version 12.4)
  • (pyenv) Python 3.9.10

还有哪些选项可以用来修复它?

就在上周遇到了同样的问题。我想说的问题是,你试图安装PyAv没有适当的动态库从FFMPEG。PyAv只是一堆Python绑定,用于连接系统中的二进制动态库。我也假设你使用的是Ubuntu 18.04。标准存储库上最新的FFMPEG版本不好,是3.x。

你需要编译一些等于或高于4.0的FFMPEG版本。为此,您需要从源代码编译FFMPEG,使用make和make install编译并安装它。或者你可以添加一个存储库,你想要的二进制文件。我自己编译了它,它生成了我需要的所有库,所以这就是我在这里描述的。

首先在终端上运行ffmpeg,以确保您的FFMPEG版本低于4.0。如果是这种情况,运行以下命令。他们将下载源代码、解压缩、编译并安装文件。之后,PyAv的Python绑定应该会找到正确的库,并且安装将能够继续进行。

确保您有依赖项:

sudo apt install yasm libvpx. libx264. cmake libavdevice-dev libavfilter-dev libopus-dev libvpx-dev pkg-config libsrtp2-dev libpython3-dev python3-numpy

然后下载源码:

curl https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/ffmpeg/7:4.2.4-1ubuntu0.1/ffmpeg_4.2.4.orig.tar.xz --output ffmpeg_4.2.4

解压文件:

tar -xf ffmpeg_4.2.4.orig.tar.xz

目录:

cd ffmpeg-4.2.4/

编译并安装文件:

./configure --disable-static --enable-shared --disable-doc

make

sudo make install

sudo ldconfig

它现在应该编译和安装FFMPEG 4.2.4的动态库。完成后,打开NEW终端,并输入ffmpeg来验证一个新的4。X版本现在可用。然后尝试再次安装CVAT,它现在应该工作了。

最新更新