错误:安装ffpyplayer linux时命令'gcc'失败,退出状态为1

时间:2019-03-11 22:31:57

标签: linux gcc

/home/keh/Downloads/pypy3.6/bin/pip3 install ffpyplayer
Collecting ffpyplayer
  Using cached https://files.pythonhosted.org/packages/d6/72/827ee3a519128ba6ea6e6714789435eefbadc03eef92d642f858bd64a313/ffpyplayer-4.1.0.tar.gz
Building wheels for collected packages: ffpyplayer
  Building wheel for ffpyplayer (setup.py) ... error
  Complete output from command /home/keh/Downloads/pypy3.6/bin/pypy3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ilq2g1zl/ffpyplayer/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-y1e8h8y8 --python-tag pp370:
  WARNING: A problem occured while running pkg-config --libs --cflags libavcodec libavdevice libavfilter libavformat libavutil libswscale libswresample libpostproc (code 1)

  b"Package libavdevice was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavdevice.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libavdevice' found\nPackage libavfilter was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavfilter.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libavfilter' found\nPackage libswscale was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libswscale.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libswscale' found\nPackage libpostproc was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libpostproc.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libpostproc' found\n"

  WARNING: A problem occured while running pkg-config --libs --cflags sdl2 (code 1)

  b"Package sdl2 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `sdl2.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'sdl2' found\n"

  WARNING: A problem occured while running pkg-config --libs --cflags sdl (code 1)

  b"Package sdl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `sdl.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'sdl' found\n"

  Selecting SDL2 out of (SDL, SDL2)
  Generating ffconfig.h
  Generating ffconfig.pxi
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/ffpyplayer
  copying ffpyplayer/__init__.py -> build/lib.linux-x86_64-3.6/ffpyplayer
  creating build/lib.linux-x86_64-3.6/ffpyplayer/player
  copying ffpyplayer/player/__init__.py -> build/lib.linux-x86_64-3.6/ffpyplayer/player
  creating build/lib.linux-x86_64-3.6/ffpyplayer/tests
  copying ffpyplayer/tests/test_write.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
  copying ffpyplayer/tests/__init__.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
  copying ffpyplayer/tests/test_play.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
  copying ffpyplayer/tests/test_pic.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
  copying ffpyplayer/tests/common.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
  creating build/lib.linux-x86_64-3.6/ffpyplayer/clib
  copying ffpyplayer/clib/misc.h -> build/lib.linux-x86_64-3.6/ffpyplayer/clib
  running build_ext
  cythoning ffpyplayer/pic.pyx to ffpyplayer/pic.c
  /home/keh/Downloads/pypy3.6/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-ilq2g1zl/ffpyplayer/ffpyplayer/pic.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      >>> img2 = copy.deepcopy(img)
  '''

  __all__ = ('Image', 'SWScale', 'get_image_size', 'ImageLoader')

  include "includes/inline_funcs.pxi"
  ^
  ------------------------------------------------------------

  ffpyplayer/pic.pyx:57:0: 'includes/inline_funcs.pxi' not found

  building 'ffpyplayer.pic' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/ffpyplayer
  creating build/temp.linux-x86_64-3.6/ffpyplayer/clib
  gcc -pthread -DNDEBUG -O2 -fPIC -I/tmp/pip-install-ilq2g1zl/ffpyplayer/ffpyplayer -I/tmp/pip-install-ilq2g1zl/ffpyplayer/ffpyplayer/includes -I/home/keh/Downloads/pypy3.6/include -c ffpyplayer/pic.c -o build/temp.linux-x86_64-3.6/ffpyplayer/pic.o -O3 -fno-strict-aliasing -Wno-error
  ffpyplayer/pic.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
   #error Do not use this file, it is the result of a failed Cython compilation.
    ^~~~~
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for ffpyplayer
  Running setup.py clean for ffpyplayer
Failed to build ffpyplayer
Installing collected packages: ffpyplayer
  Running setup.py install for ffpyplayer ... error
    Complete output from command /home/keh/Downloads/pypy3.6/bin/pypy3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ilq2g1zl/ffpyplayer/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-mhn9yepl/install-record.txt --single-version-externally-managed --compile:
    WARNING: A problem occured while running pkg-config --libs --cflags libavcodec libavdevice libavfilter libavformat libavutil libswscale libswresample libpostproc (code 1)

    b"Package libavdevice was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavdevice.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libavdevice' found\nPackage libavfilter was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavfilter.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libavfilter' found\nPackage libswscale was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libswscale.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libswscale' found\nPackage libpostproc was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libpostproc.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libpostproc' found\n"

    WARNING: A problem occured while running pkg-config --libs --cflags sdl2 (code 1)

    b"Package sdl2 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `sdl2.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'sdl2' found\n"

    WARNING: A problem occured while running pkg-config --libs --cflags sdl (code 1)

    b"Package sdl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `sdl.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'sdl' found\n"

    Selecting SDL2 out of (SDL, SDL2)
    Generating ffconfig.h
    Generating ffconfig.pxi
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/ffpyplayer
    copying ffpyplayer/__init__.py -> build/lib.linux-x86_64-3.6/ffpyplayer
    creating build/lib.linux-x86_64-3.6/ffpyplayer/player
    copying ffpyplayer/player/__init__.py -> build/lib.linux-x86_64-3.6/ffpyplayer/player
    creating build/lib.linux-x86_64-3.6/ffpyplayer/tests
    copying ffpyplayer/tests/test_write.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
    copying ffpyplayer/tests/__init__.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
    copying ffpyplayer/tests/test_play.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
    copying ffpyplayer/tests/test_pic.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
    copying ffpyplayer/tests/common.py -> build/lib.linux-x86_64-3.6/ffpyplayer/tests
    creating build/lib.linux-x86_64-3.6/ffpyplayer/clib
    copying ffpyplayer/clib/misc.h -> build/lib.linux-x86_64-3.6/ffpyplayer/clib
    running build_ext
    cythoning ffpyplayer/pic.pyx to ffpyplayer/pic.c
    /home/keh/Downloads/pypy3.6/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-ilq2g1zl/ffpyplayer/ffpyplayer/pic.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
        >>> img2 = copy.deepcopy(img)
    '''

    __all__ = ('Image', 'SWScale', 'get_image_size', 'ImageLoader')

    include "includes/inline_funcs.pxi"
    ^
    ------------------------------------------------------------

    ffpyplayer/pic.pyx:57:0: 'includes/inline_funcs.pxi' not found

    building 'ffpyplayer.pic' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/ffpyplayer
    creating build/temp.linux-x86_64-3.6/ffpyplayer/clib
    gcc -pthread -DNDEBUG -O2 -fPIC -I/tmp/pip-install-ilq2g1zl/ffpyplayer/ffpyplayer -I/tmp/pip-install-ilq2g1zl/ffpyplayer/ffpyplayer/includes -I/home/keh/Downloads/pypy3.6/include -c ffpyplayer/pic.c -o build/temp.linux-x86_64-3.6/ffpyplayer/pic.o -O3 -fno-strict-aliasing -Wno-error
    ffpyplayer/pic.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
     #error Do not use this file, it is the result of a failed Cython compilation.
      ^~~~~
    error: command 'gcc' failed with exit status 1

    ----------------------------------------

当我在pypy中使用pip3安装ffpyplayer时,这是错误。 由于行数太多,因此我不确定到底哪一条是主要问题。我已经安装了sudo apt-get python3-dev和其他人建议用来解决此问题的库,但是,我一直收到此错误。当我搜索gcc失败错误时,大多数人说要安装一些库,但是,看来我已经安装了所有库。 有想法吗?

0 个答案:

没有答案