今天在安装应用的时候发生报错,部分报错信息如下:
Collecting av==8.0.3 (from -r requirements_inference.txt (line 1))
Downloading av-8.0.3.tar.gz (2.3 MB)
—————————————- 2.3/2.3 MB 64.3 MB/s eta 0:00:00
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “C:\Users\Administrator\AppData\Local\Temp\pip-install-s1gq71ar\av_b47fdcd8963743f192bb5be2ec455dec\setup.py”, line 6, in
from distutils.msvccompiler import MSVCCompiler
ModuleNotFoundError: No module named ‘distutils.msvccompiler’
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
这个是在安装av==8.0.3时发生的报错,提示ModuleNotFoundError: No module named ‘distutils.msvccompiler’,意思是没有distutils.msvccompiler这个模块,主要是setuptools版本问题,你可以降低setuptools版本,比如65以下。
也可以用另一种解决方法,就是安装更高版本的av,而不是使用8.0.3版本,直接删除版本号即可。