繁体   English   中英

安装 Scikits.audiolab 时出错

[英]Error Installing Scikits.audiolab

我正在尝试使用 pip 安装 scikits.audiolab。 我读了这篇文章,但是,看起来那个用户的问题是他们没有安装 numpy。 我可以通过卸载 numpy 并运行pip install scikits.audiolab来复制他们的跟踪。 当我有 numpy 时,我得到的跟踪是:

numpy.distutils.system_info.NotFoundError: sndfile (http://www.mega-nerd.com/libsndfile/) library not found.
Directories to search for the libraries can be specified in the
site.cfg file, in section [sndfile].

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/p8/tbdq1bmx54d68dftpx9_p6qr0000gn/T/pip-build-vuIg71/scikits.audiolab/

我发现的有关此错误的所有信息都指向我从 pypi 下载 scikits.audiolab 并运行python setup.py install ,这显然是“静态链接到 libsndfile”。 但是当我按照这些说明操作时,我得到了几乎相同的错误:

numpy.distutils.system_info.NotFoundError: sndfile (http://www.mega-nerd.com/libsndfile/) library not found.
Directories to search for the libraries can be specified in the
site.cfg file, in section [sndfile].

运行pip -V pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)返回pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)

运行python --version返回Python 2.7.12

任何能给我指明正确方向的人都是真正的英雄。

事实证明我缺少libsndfile。 我偶然发现了Python audiolab安装,无法在Mac OSX上安装(或找到)libsndfile,它提供了极好的方向,就像一个魅力。 我也有自制软件,所以看来brew install libsndfile也会brew install libsndfile 在此之后,我能够使用pip install scikits.audiolab

通过安装libsndfile1-dev软件包解决了Ubuntu 16.04上的问题

sudo apt-get install libsndfile1-dev

要安装scikits.audiolab,你肯定需要Python 2.7

因此,运行以下命令将解决此问题:

sudo python2.7 -m pip install scikits.audiolab

我无法在 Big Sur 上安装它(虽然不确定它是否特定于 Big Sur):

2021-10-19T10:06:54,996   scikits/audiolab/pysndfile/_sndfile.c:981:15: error: implicit declaration of function 'PyString_FromStringAndSize' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
2021-10-19T10:06:54,996     __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,002     __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,008   scikits/audiolab/pysndfile/_sndfile.c:1861:15: error: implicit declaration of function 'PyString_FromStringAndSize' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
2021-10-19T10:06:55,008     __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,008     __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,009     __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,032     __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,033     __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,035     __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,037     __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,039     __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:55,070   scikits/audiolab/pysndfile/_sndfile.c:11168:21: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:55,070   scikits/audiolab/pysndfile/_sndfile.c:11169:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:55,070   scikits/audiolab/pysndfile/_sndfile.c:11170:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:55,071   scikits/audiolab/pysndfile/_sndfile.c:11179:24: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:55,071   scikits/audiolab/pysndfile/_sndfile.c:11180:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:55,071   scikits/audiolab/pysndfile/_sndfile.c:11181:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:55,071   scikits/audiolab/pysndfile/_sndfile.c:11182:13: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:55,071   scikits/audiolab/pysndfile/_sndfile.c:11183:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:55,071   scikits/audiolab/pysndfile/_sndfile.c:11184:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:55,072   scikits/audiolab/pysndfile/_sndfile.c:11357:24: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:55,072   scikits/audiolab/pysndfile/_sndfile.c:11358:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:55,072   scikits/audiolab/pysndfile/_sndfile.c:11359:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:55,072   scikits/audiolab/pysndfile/_sndfile.c:11360:13: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:55,072   scikits/audiolab/pysndfile/_sndfile.c:11361:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:55,073   scikits/audiolab/pysndfile/_sndfile.c:11362:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:55,073   scikits/audiolab/pysndfile/_sndfile.c:11399:14: error: implicit declaration of function 'PyCObject_FromVoidPtr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
2021-10-19T10:06:55,076   scikits/audiolab/pysndfile/_sndfile.c:11612:25: error: implicit declaration of function 'PyNumber_Int' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
2021-10-19T10:06:55,078   fatal error: too many errors emitted, stopping now [-ferror-limit=]
2021-10-19T10:06:55,080   65 warnings and 20 errors generated.
2021-10-19T10:06:55,085   error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -I/usr/local/opt/readline/include -I/usr/local/opt/openjdk/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/qt@5/include -I/usr/local/include -I/usr/local/lib/python3.9/site-packages/numpy/core/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c scikits/audiolab/pysndfile/_sndfile.c -o build/temp.macosx-11-x86_64-3.9/scikits/audiolab/pysndfile/_sndfile.o -MMD -MF build/temp.macosx-11-x86_64-3.9/scikits/audiolab/pysndfile/_sndfile.o.d" failed with exit status 1
2021-10-19T10:06:55,128   ERROR: Failed building wheel for scikits.audiolab
2021-10-19T10:06:56,870     scikits/audiolab/pysndfile/_sndfile.c:981:15: error: implicit declaration of function 'PyString_FromStringAndSize' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
2021-10-19T10:06:56,870       __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,876       __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,882     scikits/audiolab/pysndfile/_sndfile.c:1861:15: error: implicit declaration of function 'PyString_FromStringAndSize' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
2021-10-19T10:06:56,882       __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,882       __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,882       __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,905       __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,907       __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,908       __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,910       __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,912       __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2021-10-19T10:06:56,944     scikits/audiolab/pysndfile/_sndfile.c:11168:21: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:56,944     scikits/audiolab/pysndfile/_sndfile.c:11169:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:56,945     scikits/audiolab/pysndfile/_sndfile.c:11170:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:56,945     scikits/audiolab/pysndfile/_sndfile.c:11179:24: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:56,945     scikits/audiolab/pysndfile/_sndfile.c:11180:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:56,945     scikits/audiolab/pysndfile/_sndfile.c:11181:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:56,946     scikits/audiolab/pysndfile/_sndfile.c:11182:13: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:56,946     scikits/audiolab/pysndfile/_sndfile.c:11183:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:56,946     scikits/audiolab/pysndfile/_sndfile.c:11184:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:56,946     scikits/audiolab/pysndfile/_sndfile.c:11357:24: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:56,946     scikits/audiolab/pysndfile/_sndfile.c:11358:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:56,946     scikits/audiolab/pysndfile/_sndfile.c:11359:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:56,947     scikits/audiolab/pysndfile/_sndfile.c:11360:13: error: no member named 'exc_type' in 'struct _ts'
2021-10-19T10:06:56,947     scikits/audiolab/pysndfile/_sndfile.c:11361:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
2021-10-19T10:06:56,947     scikits/audiolab/pysndfile/_sndfile.c:11362:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
2021-10-19T10:06:56,947     scikits/audiolab/pysndfile/_sndfile.c:11399:14: error: implicit declaration of function 'PyCObject_FromVoidPtr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
2021-10-19T10:06:56,950     scikits/audiolab/pysndfile/_sndfile.c:11612:25: error: implicit declaration of function 'PyNumber_Int' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
2021-10-19T10:06:56,952     fatal error: too many errors emitted, stopping now [-ferror-limit=]
2021-10-19T10:06:56,954     65 warnings and 20 errors generated.
2021-10-19T10:06:56,958     error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -I/usr/local/opt/readline/include -I/usr/local/opt/openjdk/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/qt@5/include -I/usr/local/include -I/usr/local/lib/python3.9/site-packages/numpy/core/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c scikits/audiolab/pysndfile/_sndfile.c -o build/temp.macosx-11-x86_64-3.9/scikits/audiolab/pysndfile/_sndfile.o -MMD -MF build/temp.macosx-11-x86_64-3.9/scikits/audiolab/pysndfile/_sndfile.o.d" failed with exit status 1
2021-10-19T10:06:56,996 ERROR: Command errored out with exit status 1: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dr/28w42sbj7xj4r02p4xn44kt00000gr/T/pip-install-kr7isat0/scikits-audiolab_61e03334be2948edbb0d1001e32cb290/setup.py'"'"'; __file__='"'"'/private/var/folders/dr/28w42sbj7xj4r02p4xn44kt00000gr/T/pip-install-kr7isat0/scikits-audiolab_61e03334be2948edbb0d1001e32cb290/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dr/28w42sbj7xj4r02p4xn44kt00000gr/T/pip-record-umy6eo2i/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9/scikits.audiolab Check the logs for full command output.
2021-10-19T10:06:56,997     raise InstallationSubprocessError(proc.returncode, command_desc)
2021-10-19T10:06:56,997 pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dr/28w42sbj7xj4r02p4xn44kt00000gr/T/pip-install-kr7isat0/scikits-audiolab_61e03334be2948edbb0d1001e32cb290/setup.py'"'"'; __file__='"'"'/private/var/folders/dr/28w42sbj7xj4r02p4xn44kt00000gr/T/pip-install-kr7isat0/scikits-audiolab_61e03334be2948edbb0d1001e32cb290/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dr/28w42sbj7xj4r02p4xn44kt00000gr/T/pip-record-umy6eo2i/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9/scikits.audiolab Check the logs for full command output.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM