簡體   English   中英

在 Mac 上安裝 pyfastext 時出錯:命令“cc”失敗,退出狀態為 1

[英]Got error on installing pyfastext on Mac: command 'cc' failed with exit status 1

我剛剛在安裝 pyfasttext 時出錯。

cogent@MBP: pip install --user pyfasttext          

然后我得到了這些:

Collecting pyfasttext Downloading https://files.pythonhosted.org/packages/f5/ef/90606442481d1e4ab10eba8c2b2c449ceaa70c60e9b8d5898bb7504e3634/pyfasttext-0.4.6.tar.gz (244kB) 100% |██████████████ ██████████████████| 245kB 224kB/s 已滿足要求:/Users/cogent/Library/Python/2.7/lib/python/site-packages 中的未來(來自 pyfasttext)(0.18.1) 已滿足要求:/Users/cogent/Library/ 中的 cysignals Python/2.7/lib/python/site-packages(來自 pyfasttext)(1.10.2)要求已經滿足:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python 中的 numpy(來自 pyfasttext) (1.8.0rc1)要求已經滿足:/Library/Python/2.7/site-packages 中的 Cython>=0.28(來自 cysignals->pyfasttext)(0.29.13)安裝收集的包:pyfasttext 運行 setup.py install for pyfasttext.. . 錯誤 Complete output from command /usr/bin/python -u -c "import setuptools, tokenize; file ='/private/var/folders/gm/kpbf6gyx1dx_167zbp2gmdym0000gn/T/pip-install-wuuXwu/pyfasttext/setup.py' ;f=getattr(tokenize, 'open', open)( file );code=f.read().replace('\r\n', '\n');f.close();exec(compile(代碼、文件、'exec'))" 安裝 -- 記錄 /private/var/folders/gm/kpbf6gyx1dx_167zbp2gmdym0000gn/T/pip-record-Qtcina/install-record.txt --single-version-externally-managed --compile --user --prefix=: running install running build running build_ext building 'pyfasttext' extension 創建 build 創建 build/temp.macosx-10.14-intel-2.7 創建 build/temp.macosx-10.14-intel-2.7/src 創建 build/temp.macosx-10.14-intel-2.7/src/fastText創建 build/temp.macosx-10.14-intel-2.7/src/fastText/src cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -iquote。 -include src/custom_exit.h -arch i386 -arch x86_64 -pipe -Isrc -I/Users/cogent/Library/Python/2.7/lib/python/site-packages/cysignals -I。 -Isrc/variant/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python /numpy/core/include -c src/pyfasttext.cpp -o build/temp.macosx-10.14-intel-2.7/src/pyfasttext.o -Wno-sign-compare -std=c++0x 在 src 包含的文件中/pyfasttext.cpp:53:在 /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85 包含的文件中:/System/Library/Frameworks/Python.framework/Versions /2.7/include/python2.7/unicodeobject.h:534:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] register PyObject obj, / Object */ ^~~~~ ~~~~ /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:553:5:警告:“注冊”存儲 class 說明符已棄用且不兼容 C++17 [-Wdeprecated-register] register PyObject obj / Object */ ^~~~~~~~~ /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:575: 5:警告:'register' storage class 說明符已棄用且與 C++17 [-Wdeprecated-register] register const wchar_t w, / wchar_t buffer */ ^~~~~~~~~ /System/Library/Frameworks/Python 不兼容。 framework/Versions/2.7/include/python2.7/unicodeobject.h:593:5: warning: 'register' storage class 說明符已棄用且與 C++17 [-Wdeprecated-register] register wchar_t w, / wchar_t 不兼容~~~~~~~~ 在 src/pyfasttext.cpp:53 包含的文件中:在 /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:94 包含的文件中:/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/ stringobject.h:173:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] register PyObject obj, / string or Unicode object */ ^~~~~~~~~ /System /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/stringobject.h:174:5:警告:“注冊”存儲 class 說明符已棄用且與 C++17 [-Wdeprecated-register] 寄存器不兼容*s, /* 指向緩沖區變量的指針 */ ^~~~~~~~~ /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/stringobject.h:175:5: 警告: 'register' 存儲 class 說明符已棄用,並且與 C++17 [-Wdeprecated-register] 寄存器 Py_ssize_t len /指向長度變量的指針或 Z6C3E226^B4D4795D518AB341B0~~~~~~EC298 不兼容在 src/pyfasttext.cpp:676 中包含的文件中:在 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:4 中包含的文件中:在/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:17 中包含的文件中:在/System/Library/Frameworks 中包含的文件中/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarraytypes.h:1760:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/ numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "Using deprecated NumPy API, disable it由 " \ ^ 生成 8 個警告。 在 src/pyfasttext.cpp:53 中包含的文件中:在 /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85 中包含的文件中:/System/Library/Frameworks/ Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:534:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] register PyObject obj, / Object */ ^~~~~~~~~ /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:553:5: 警告:“注冊”存儲 class 說明符已棄用且不兼容使用 C++17 [-Wdeprecated-register] 注冊 PyObject obj / Object */ ^~~~~~~~~ /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:575 :5: 警告:“注冊”存儲 class 規范 er 已棄用且與 C++17 [-Wdeprecated-register] register const wchar_t w, / wchar_t buffer */ ^~~~~~~~~ /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2 不兼容.7/unicodeobject.h:593:5: warning: 'register' storage class specifier is deprecated and in compatible with C++17 [-Wdeprecated-register] register wchar_t w, / wchar_~~~~~~ In src/pyfasttext.cpp:53 中包含的文件:/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:94 中包含的文件:/System/Library/Frameworks/Python .framework/Versions/2.7/include/python2.7/stringobject.h:173:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] register PyObject obj, / string or Unicode object */ ^~ ~~~~~~~ /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/stringobject.h:174:5: warning: 'register' storage class 說明符已棄用且與 C++17 不兼容[-Wdeprecated-register] register char **s, /* 指向緩沖區變量的指針 */ ^~~~~~~~~ /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/ stringobject.h:175:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] register Py_ssize_t len / pointer to length variable or NULL ^~~~~~~~~ In file included來自 src/pyfasttext.cpp:676:在 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:4 中包含的文件中:在文件中包含在 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/includ e/numpy/ndarrayobject.h:17:在 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarraytypes.h:1760 中包含的文件中:/ System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: 警告:“使用已棄用的 NumPy ZDB974238714CA8DE634A7CE10”禁用它定義 NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "使用已棄用的 NumPy API,通過 " \ ^ 禁用它生成 8 個警告。 cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -iquote。 -include src/custom_exit.h -arch i386 -arch x86_64 -pipe -Isrc -I/Users/cogent/Library/Python/2.7/lib/python/site-packages/cysignals -I。 -Isrc/variant/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python /numpy/core/include -c src/fasttext_access.cpp -o build/temp.macosx-10.14-intel-2.7/src/fasttext_access.o -Wno-sign-compare -std=c++0x src/fasttext_access.cpp :43:1: 錯誤:非類型模板參數不是指向成員常量 ALLOW_METHOD_ACCESS(FastText, bool, checkModel, std::istream&); 的指針 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ src/private_access.h:55:38: 注意: 擴展自宏 'ALLOW_METHOD_ACCESS' 模板結構 rob ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/fasttext_access.cpp:54:1: error: non-type template argument is不是指向成員常量 ALLOW_CONST_METHOD_ACCESS(Dictionary, int32_t, find, const std::string&); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ src/private_access.h:59:38: 注意: 擴展自宏 'ALLOW_CONST_METHOD_ACCESS' 模板結構 rob ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ fasttext_access.cpp:55:1: 錯誤:非類型模板參數不是指向成員常量 ALLOW_CONST_METHOD_ACCESS(Dictionary, void, pushHash, std::vector&, int32_t) 的指針; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/private_access.h:59:38: 注意:從宏擴展'ALLOW_CONST_METHOD_ACCESS' 模板結構 rob ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ src/fasttext_access.cpp:56:1: 錯誤:非類型模板參數不是指向成員常量 ALLOW_METHOD_ACCESS(Dictionary, void, initTableDiscard, ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ src/private_access.h:55:38: 注意: 擴展自宏 'ALLOW_METHOD_ACCESS' 模板結構 rob ^~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/fasttext_access.cpp:57:1: 錯誤:非類型模板參數不是指向成員的指針常量 ALLOW_METHOD_ACCESS(字典, void, initNgrams, ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ src/private_access.h:55:38: 注意: 擴展自宏 'ALLOW_METHOD_ACCESS' 模板結構 rob ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~ 產生5個錯誤。 錯誤:命令“cc”失敗,退出狀態為 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/gm/kpbf6gyx1dx_167zbp2gmdym0000gn/T/pip-install-wuuXwu/pyfasttext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/gm/kpbf6gyx1dx_167zbp2gmdym0000gn/T/pip-record-Qtcina/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /private/var/folders/gm/kpbf6gyx1dx_167zbp2gmdym0000gn/T/pip-install-wuuXwu/pyfasttext/

為什么我收到這些消息? 有什么想法嗎?非常感謝!

根據這個答案, PyFastText 不再維護。

您可以改為使用:

pip install fastText

暫無
暫無

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

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