在pip install aubio时出现了报错问题
Failed to build aubio
Installing collected packages: aubio
Running setup.py install for aubio … - WARNING: Subprocess output does not appear to be encoded as cp936
WARNING: Subprocess output does not appear to be encoded as cp936
WARNING: Subprocess output does not appear to be encoded as cp936
WARNING: Subprocess output does not appear to be encoded as cp936
WARNING: Subprocess output does not appear to be encoded as cp936
WARNING: Subprocess output does not appear to be encoded as cp936
WARNING: Subprocess output does not appear to be encoded as cp936
WARNING: Subprocess output does not appear to be encoded as cp936
error
ERROR: Command errored out with exit status 1:
command: ‘D:\Software\Anaconda3\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\MEC\AppData\Local\Temp\pip-install-guhnkkme\aubio\setup.py’"’"’; file=’"’"‘C:\Users\MEC\AppData\Local\Temp\pip-install-guhnkkme\aubio\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\MEC\AppData\Local\Temp\pip-record-14whrd6b\install-record.txt’ --single-version-externally-managed --compile --install-headers ‘D:\Software\Anaconda3\Include\aubio’
cwd: C:\Users\MEC\AppData\Local\Temp\pip-install-guhnkkme\aubio
Complete output (65 lines):
running install
running build
running build_py
running build_ext
checking for aubio = 0.4.9
Running “pkg-config --libs --cflags aubio = 0.4.9” failed: FileNotFoundError(2, ‘绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆\x82’, None, 2, None)
Info: aubio 0.4.9 was not found by pkg-config
Info: looking for optional additional packages
checking for libavcodec
Running “pkg-config --libs --cflags libavcodec” failed: FileNotFoundError(2, ‘绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆\x82’, None, 2, None)
checking for libavformat
Running “pkg-config --libs --cflags libavformat” failed: FileNotFoundError(2, ‘绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆\x82’, None, 2, None)
checking for libavutil
Running “pkg-config --libs --cflags libavutil” failed: FileNotFoundError(2, ‘绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆\x82’, None, 2, None)
checking for libswresample
Running “pkg-config --libs --cflags libswresample” failed: FileNotFoundError(2, ‘绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆\x82’, None, 2, None)
checking for libavresample
Running “pkg-config --libs --cflags libavresample” failed: FileNotFoundError(2, ‘绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆\x82’, None, 2, None)
checking for sndfile
Running “pkg-config --libs --cflags sndfile” failed: FileNotFoundError(2, ‘绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆\x82’, None, 2, None)
checking for samplerate
Running “pkg-config --libs --cflags samplerate” failed: FileNotFoundError(2, ‘绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆\x82’, None, 2, None)
Info: libaubio was not installed or built locally with waf, adding src/
Running command: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe -E -DAUBIO_UNSTABLE=1 -Isrc src\aubio.h
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\MEC\AppData\Local\Temp\pip-install-guhnkkme\aubio\setup.py”, line 95, in
‘aubiocut = aubio.cut:main’,
File “D:\Software\Anaconda3\lib\site-packages\setuptools_init_.py”, line 144, in setup
return distutils.core.setup(**attrs)
File “D:\Software\Anaconda3\lib\distutils\core.py”, line 148, in setup
dist.run_commands()
File “D:\Software\Anaconda3\lib\distutils\dist.py”, line 966, in run_commands
self.run_command(cmd)
File “D:\Software\Anaconda3\lib\distutils\dist.py”, line 985, in run_command
cmd_obj.run()
File “D:\Software\Anaconda3\lib\site-packages\setuptools\command\install.py”, line 61, in run
return orig.install.run(self)
File “D:\Software\Anaconda3\lib\distutils\command\install.py”, line 545, in run
self.run_command(‘build’)
File “D:\Software\Anaconda3\lib\distutils\cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “D:\Software\Anaconda3\lib\distutils\dist.py”, line 985, in run_command
cmd_obj.run()
File “D:\Software\Anaconda3\lib\distutils\command\build.py”, line 135, in run
self.run_command(cmd_name)
File “D:\Software\Anaconda3\lib\distutils\cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “D:\Software\Anaconda3\lib\distutils\dist.py”, line 985, in run_command
cmd_obj.run()
File “D:\Software\Anaconda3\lib\distutils\command\build_ext.py”, line 340, in run
self.build_extensions()
File “D:\Software\Anaconda3\lib\distutils\command\build_ext.py”, line 449, in build_extensions
self._build_extensions_serial()
File “D:\Software\Anaconda3\lib\distutils\command\build_ext.py”, line 474, in _build_extensions_serial
self.build_extension(ext)
File “python\lib\moresetuptools.py”, line 192, in build_extension
usedouble=enable_double)
File “python\lib\gen_external.py”, line 271, in generate_external
c_declarations = get_c_declarations(header, usedouble=usedouble)
File “python\lib\gen_external.py”, line 101, in get_c_declarations
cpp_output = get_cpp_output(header=header, usedouble=usedouble)
File “python\lib\gen_external.py”, line 129, in get_cpp_output
% err_output.decode(‘utf8’))
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xd3 in position 0: invalid continuation byte
进入aubio官网查询
https://aubio.org/manual/latest/python_module.html
发现pip安装需要额外的编译器
于是推荐使用conda安装
conda config --add channels conda-forge
conda install -c conda-forge aubio