m0_58274586 2024-07-27 14:38 采纳率: 0%
浏览 60
已结题

pip安装PyAV报错

Q:pip安装av报错
错误信息如下:

img

C:\Users\LRC\Desktop\phi\phisap-dev>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting av==10.0.0 (from -r requirements.txt (line 1))
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/09/45/eb750ba15c44e8106f58a22e6789f5ddbe5584d9dcb4e755b08d47ed6261/av-10.0.0.tar.gz (2.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [74 lines of output]
      Compiling av\buffer.pyx because it changed.
      [1/1] Cythonizing av\buffer.pyx
      Compiling av\bytesource.pyx because it changed.
      [1/1] Cythonizing av\bytesource.pyx
      Compiling av\descriptor.pyx because it changed.
      [1/1] Cythonizing av\descriptor.pyx
      Compiling av\dictionary.pyx because it changed.
      [1/1] Cythonizing av\dictionary.pyx
      Compiling av\enum.pyx because it changed.
      [1/1] Cythonizing av\enum.pyx
      Compiling av\error.pyx because it changed.
      [1/1] Cythonizing av\error.pyx
      Compiling av\format.pyx because it changed.
      [1/1] Cythonizing av\format.pyx
      Compiling av\frame.pyx because it changed.
      [1/1] Cythonizing av\frame.pyx
      performance hint: av\logging.pyx:232:5: Exception check on 'log_callback' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'log_callback' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'log_callback' to allow an error code to be returned.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      cdef const char *log_context_name(void *ptr) nogil:
          cdef log_context *obj = <log_context*>ptr
          return obj.name

      cdef lib.AVClass log_class
      log_class.item_name = log_context_name
                            ^
      ------------------------------------------------------------

      av\logging.pyx:216:22: Cannot assign type 'const char *(void *) except? NULL nogil' to 'const char *(*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to the type of 'log_context_name'.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...

      # Start the magic!
      # We allow the user to fully disable the logging system as it will not play
      # nicely with subinterpreters due to FFmpeg-created threads.
      if os.environ.get('PYAV_LOGGING') != 'off':
          lib.av_log_set_callback(log_callback)
                                  ^
      ------------------------------------------------------------

      av\logging.pyx:351:28: Cannot assign type 'void (void *, int, const char *, va_list) except * nogil' to 'av_log_callback' (alias of 'void (*)(void *, int, const char *, va_list) noexcept nogil'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'log_callback'.
      Compiling av\logging.pyx because it changed.
      [1/1] Cythonizing av\logging.pyx
      Traceback (most recent call last):
        File "C:\Users\LRC\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\LRC\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\LRC\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\LRC\AppData\Local\Temp\pip-build-env-qf_5hwdn\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\LRC\AppData\Local\Temp\pip-build-env-qf_5hwdn\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "C:\Users\LRC\AppData\Local\Temp\pip-build-env-qf_5hwdn\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\LRC\AppData\Local\Temp\pip-build-env-qf_5hwdn\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 157, in <module>
        File "C:\Users\LRC\AppData\Local\Temp\pip-build-env-qf_5hwdn\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize
          cythonize_one(*args)
        File "C:\Users\LRC\AppData\Local\Temp\pip-build-env-qf_5hwdn\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: av\logging.pyx
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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



  • 写回答

19条回答 默认 最新

  • 专家-司宇[在线] 2024-07-27 14:38
    关注
    获得0.15元问题酬金

    引自免费微信小程序:皆我百晓生

    抱歉,这个功能暂未开放上线。您也可以用中文或英文问我一些其他的问题,我会尽力为您解答。

    评论 编辑记录

报告相同问题?

问题事件

  • 系统已结题 8月4日
  • 修改了问题 7月28日
  • 赞助了问题酬金15元 7月27日
  • 创建了问题 7月27日

悬赏问题

  • ¥15 微软硬件驱动认证账号申请
  • ¥15 有人知道怎么在R语言里下载Git上的miceco这个包吗
  • ¥15 GPT写作提示指令词
  • ¥20 如何在cst中建立这种螺旋扇叶结构
  • ¥20 根据动态演化博弈支付矩阵完成复制动态方程求解和演化相图分析等
  • ¥20 关于DAC输出1.000V对分辨率和精度的要求
  • ¥15 华为超融合部署环境下RedHat虚拟机分区扩容问题
  • ¥15 哪位能做百度地图导航触点播报?
  • ¥15 请问GPT语言模型怎么训练?
  • ¥15 已知平面坐标系(非直角坐标系)内三个点的坐标,反求两坐标轴的夹角