我使用的是 Python 3.4 和 OS X Yosemite (10.10.4)。根据网站,这个版本的 pytaglib 应该是兼容的。
https://pypi.python.org/pypi/pytaglib
我已经尝试了页面上列出的所有安装方法,但我一直遇到同样的错误。
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv - O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c src/taglib.cpp -o build/temp.macosx-10.6-intel-3.4/src/taglib.o src/taglib.cpp:268:10: fatal error: 'taglib/tstring.h' file not found
#include "taglib/tstring.h"
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
AccuDeveloper-iMac:pytaglib-1.0.3 accudeveloper$ sudo ln -s/Developer/SDKs/MacOSX10.8.sdk MacOSX10.6.sdk
也许它认为我使用的不是我实际使用的操作系统?
最佳答案
你有安装taglib吗?
我在我的机器上遇到了同样的错误,但是能够通过使用 Homebrew 安装 taglib 来让它工作:
brew install taglib
sudo pip3 install pytaglib
https://stackoverflow.com/questions/31750384/