簡體   English   中英

點擊安裝pytaglib錯誤

[英]Pip installing pytaglib error

當我嘗試使用以下方法安裝pytaglib時:

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/

我根本無法找到解決這個問題的方法。 不幸的是我在谷歌/這里找不到任何東西。 我正在使用fedora。 有沒有人遇到這樣的問題? 有幫助嗎?

我在Ubuntu 16.04和Python 2上遇到了同樣的問題。我得到的唯一解決辦法是強制v1.4.1: pip install pytaglib==1.4.1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM