参考:
https://github.com/PyAV-Org/PyAV/issues/238
https://pyav.org/docs/6.1.2/installation.html#mac-os-x
=====================
报错信息:
C:\Users\liuxue>pip install av Collecting av Using cached av-0.3.3.tar.gz Installing collected packages: av Running setup.py install for av ... error Complete output from command d:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\liuxue\\appdata\\local\\temp\\pip-build-cq6uln\\av\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\liuxue\appdata\local\temp\pip-8nuwew-record\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win-amd64-2.7 creating build\lib.win-amd64-2.7\av copying av\__init__.py -> build\lib.win-amd64-2.7\av copying av\__main__.py -> build\lib.win-amd64-2.7\av creating build\lib.win-amd64-2.7\av\audio copying av\audio\__init__.py -> build\lib.win-amd64-2.7\av\audio creating build\lib.win-amd64-2.7\av\container copying av\container\__init__.py -> build\lib.win-amd64-2.7\av\container creating build\lib.win-amd64-2.7\av\filter copying av\filter\__init__.py -> build\lib.win-amd64-2.7\av\filter creating build\lib.win-amd64-2.7\av\subtitles copying av\subtitles\__init__.py -> build\lib.win-amd64-2.7\av\subtitles creating build\lib.win-amd64-2.7\av\video copying av\video\__init__.py -> build\lib.win-amd64-2.7\av\video running build_ext running reflect running config looking for avformat_open_input... missing looking for pyav_function_should_not_exist... missing looking for av_calloc... missing looking for av_frame_get_best_effort_timestamp... missing looking for avformat_alloc_output_context2... missing looking for avformat_close_input... missing looking for AVStream.index... missing looking for PyAV.struct_should_not_exist... missing looking for AVFrame.mb_type... missing We didn't find `avformat_open_input` in the libraries. We look for it only as a sanity check to make sure the build process is working as expected. It is not, so we must abort. Please open a ticket at https://github.com/mikeboers/PyAV/issues with the folowing information: PyAV: 0.3.3 Python: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] platform: Windows-10-10.0.15063 extension_extra: libraries: ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample'] extra_link_args: ['/OPT:NOREF'] library_dirs: ['d:\\python27\\libs', 'd:\\python27\\PCbuild\\amd64', 'd:\\python27\\PC\\VS9.0\\amd64'] include_dirs: ['include', 'd:\\python27\\include', 'd:\\python27\\PC'] config_macros: PYAV_VERSION=0.3.3 PYAV_VERSION_STR="0.3.3" PYAV_COMMIT_STR="unknown-commit" inline=__inline PYAV_HAVE_LIBSWRESAMPLE=1 ---------------------------------------- Command "d:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\liuxue\\appdata\\local\\temp\\pip-build-cq6uln\\av\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\liuxue\appdata\local\temp\pip-8nuwew-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\liuxue\appdata\local\temp\pip-build-cq6uln\av\
解决方法:
# General dependencies sudo apt-get install -y python-dev pkg-config # Library components sudo apt-get install -y \ libavformat-dev libavcodec-dev libavdevice-dev \ libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
-----------------------------
查询Google:
=============================
标签:__,amd64,win,avfilter,avformat,报错,build,av,2.7 From: https://www.cnblogs.com/devilmaycry812839668/p/17871308.html