您好我需要使用scikits.audiolab我尝试按如下方式安装它:
MacBook-Pro:bin$ sudo pip install scikits.audiolab
但是我得到了:
The directory '/Users/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting scikits.audiolab
Downloading scikits.audiolab-0.11.0.tar.gz (892kB)
100% |████████████████████████████████| 901kB 715kB/s
Complete output from command python setup.py egg_info:
SndfileInfo:
libraries sndfile not found in /System/Library/Frameworks/Python.framework/Versions/2.7/lib
libraries sndfile not found in /usr/local/lib
libraries sndfile not found in /usr/lib
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-IOSZ2F/scikits.audiolab/setup.py", line 85, in <module>
classifiers=CLASSIFIERS)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/private/tmp/pip-build-IOSZ2F/scikits.audiolab/setup.py", line 71, in configuration
config.add_subpackage(DISTNAME)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 966, in add_subpackage
caller_level = 2)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 935, in get_subpackage
caller_level = caller_level + 1)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scikits/audiolab/setup.py", line 10, in configuration
confgr.add_subpackage('pysndfile')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 966, in add_subpackage
caller_level = 2)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 935, in get_subpackage
caller_level = caller_level + 1)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scikits/audiolab/pysndfile/setup.py", line 25, in configuration
site.cfg file, in section [sndfile].""")
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/tmp/pip-build-IOSZ2F/scikits.audiolab/
我试过了:
Adolfos-MacBook-Pro:bin$ pip install --upgrade pip
Requirement already up-to-date: pip in /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
然后我再次尝试如下:
Adolfos-MacBook-Pro:bin$ sudo pip install scikits.audiolab
The directory '/Users/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/adolfocamachogonzalez/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting scikits.audiolab
Downloading scikits.audiolab-0.11.0.tar.gz (892kB)
100% |████████████████████████████████| 901kB 1.1MB/s
Complete output from command python setup.py egg_info:
SndfileInfo:
libraries sndfile not found in /System/Library/Frameworks/Python.framework/Versions/2.7/lib
libraries sndfile not found in /usr/local/lib
libraries sndfile not found in /usr/lib
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-KVVKKd/scikits.audiolab/setup.py", line 85, in <module>
classifiers=CLASSIFIERS)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/private/tmp/pip-build-KVVKKd/scikits.audiolab/setup.py", line 71, in configuration
config.add_subpackage(DISTNAME)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 966, in add_subpackage
caller_level = 2)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 935, in get_subpackage
caller_level = caller_level + 1)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scikits/audiolab/setup.py", line 10, in configuration
confgr.add_subpackage('pysndfile')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 966, in add_subpackage
caller_level = 2)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 935, in get_subpackage
caller_level = caller_level + 1)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scikits/audiolab/pysndfile/setup.py", line 25, in configuration
site.cfg file, in section [sndfile].""")
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/tmp/pip-build-KVVKKd/scikits.audiolab/
所以我要感谢支持克服这个问题,感谢您的支持,
答案 0 :(得分:1)
如消息所示:
如果用sudo执行pip,你可能需要sudo的-H标志。
即
sudo -H pip install scikits.audiolab
我收到了一些消息,在添加-H后,该消息消失了。