【问题标题】:Pip installing pytaglib errorpip 安装 pytaglib 错误
【发布时间】:2018-01-29 22:39:55
【问题描述】:

当我尝试安装 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/

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

【问题讨论】:

  • 您的问题解决了吗?我遇到了同样的问题。

标签: python pip taglib


【解决方案1】:

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

【讨论】:

  • 目前这是一种解决方法。谢谢你。几个github.com/supermihi/pytaglib/issues/42 提到了这个问题
  • 我知道这已经有一段时间了,但是目前还有其他解决方案吗?我在 Windows 10 上使用 Python 3.6 时遇到了同样的问题。
猜你喜欢
  • 2015-10-23
  • 1970-01-01
  • 1970-01-01
  • 2018-12-06
  • 2019-01-30
  • 2016-04-28
  • 2018-06-17
  • 2021-09-22
相关资源
最近更新 更多