Python Pip安装pytaglib错误

Python Pip安装pytaglib错误,python,pip,taglib,Python,Pip,Taglib,当我尝试使用以下内容安装pytaglibs时: pip3 install pytaglib 我发现了这些错误: > [root@localhost taglib-1.11.1]# pip3 install pytaglib WARNING: Running > pip install with root privileges is generally not a good idea. Try > `pip3 install --user` instead. Collectin

当我尝试使用以下内容安装pytaglibs时:

pip3 install pytaglib
我发现了这些错误:

> [root@localhost taglib-1.11.1]# pip3 install pytaglib WARNING: Running
> pip install with root privileges is generally not a good idea. Try
> `pip3 install --user` instead. Collecting pytaglib   Using cached
> pytaglib-1.4.2.tar.gz Requirement already satisfied: Cython in
> /usr/local/lib64/python3.6/site-packages (from pytaglib) Installing
> collected packages: pytaglib   Running setup.py install for pytaglib
> ... error
>     Complete output from command /usr/bin/python3 -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-et7hprc2/pytaglib/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> --record /tmp/pip-lib4owfq-record/install-record.txt --single-version-externally-managed --compile:
>     running install
>     running build
>     running build_py
>     creating build
>     creating build/lib.linux-x86_64-3.6
>     copying src/pyprinttags.py -> build/lib.linux-x86_64-3.6
>     running build_ext
>     building 'taglib' extension
>     creating build/temp.linux-x86_64-3.6
>     creating build/temp.linux-x86_64-3.6/src
>     gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c src/taglib.cpp -o build/temp.linux-x86_64-3.6/src/taglib.o
>     src/taglib.cpp: In function ‘int __pyx_pf_6taglib_4File___cinit__(__pyx_obj_6taglib_File*, PyObject*)’:
>     src/taglib.cpp:1736:50: error: no matching function for call to ‘TagLib::FileRef::create(const Py_UNICODE*&)’
>          __pyx_t_6 = TagLib::FileRef::create(__pyx_t_5);
>                                                       ^
>     In file included from src/taglib.cpp:578:0:
>     /usr/local/include/taglib/fileref.h:273:18: note: candidate: static TagLib::File* TagLib::FileRef::create(TagLib::FileName, bool,
> TagLib::AudioProperties::ReadStyle)
>          static File *create(FileName fileName,
>                       ^~~~~~
>     /usr/local/include/taglib/fileref.h:273:18: note:   no known conversion for argument 1 from ‘const Py_UNICODE* {aka const
> wchar_t*}’ to ‘TagLib::FileName {aka const char*}’
>     error: command 'gcc' failed with exit status 1
>     
>     ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-et7hprc2/pytaglib/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> --record /tmp/pip-lib4owfq-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-et7hprc2/pytaglib/

我根本找不到解决这个问题的办法。不幸的是,我在google/这里也找不到任何东西。我在用软呢帽。有人遇到过这样的问题吗?有什么帮助吗?

我在Ubuntu 16.04和Python 2上遇到了同样的问题。我得到的唯一解决方案是强制v1.4.1:
pip安装pytaglib==1.4.1

这是目前的一个解决办法。非常感谢。我知道有好几个人提到这个问题已经有一段时间了,但是现在还有其他的解决办法吗?我在Windows 10上遇到了与Python 3.6相同的问题。您解决了这个问题吗?我也遇到同样的问题。