2017-05-03 24 views
0

我很期待使用安裝的PIP封裝的hunspell,但它引發以下錯誤:安裝包的hunspell

收集的hunspell 使用緩存中的hunspell-0.4.1.tar.gz 大廈輪子收集包:hunspell 運行setup.py bdist_wheel for hunspell ...錯誤 命令的完整輸出/ root/anaconda3/bin/python -u -c「import setuptools,tokenize; file ='/ tmp/pip-build-oyfpp3iy /hunspell/setup.py';f=getattr(tokenize,'open',open)(file); code = f.read()。replace('\ r \ n','\ n'); f .close(); exec(編譯(代碼,file,'exec'))「bdist_wheel -d/tmp/tmphqvqt4lxpip-wheel- --python-tag cp34: /root/anaconda3/lib/python3.4/distutils/extension.py:132:UserWarning:Unknown擴展選項: 'compile_args', '宏' warnings.warn(MSG) 運行bdist_wheel 運行建立 運行build_ext 建設 '中的hunspell' 擴展 創造建立 創建構建/ temp.linux-x86_64-3.4 GCC -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build /temp.linux-x86_64-3.4/hunspell.o hunspell.c:21:22:erreur fatale:hunspell.h:Aucun fichier ou dossier類型 #include ^ 彙編結束。 錯誤:命令「GCC」失敗,退出狀態1


未能建築輪中的h​​unspell 運行setup.py乾淨的hunspell爲失敗 建設中的hunspell 安裝收集包:中的hunspell 運行的setup.py安裝hunspell ... error 完整的命令輸出/ root/anaconda3/bin/python -u -c「import setuptools,tokenize; file ='/ tmp/pip-build-oyfpp3iy/hunspell/setup.py'; f = getattr(tokenize,'open',open)(file); code = f.read().excel('\ r \ n','\ n'); f.close(); exec(compile (code,file,'exec'))「install --record /tmp/pip-euhsmasb-record/install-record.txt --single-version-external-managed -compile: /root/anaconda3/LIB/python3.4 /的distutils/extension.py:132:UserWarning:未知擴展選項: 'compile_args', '宏' warnings.warn(MSG) 運行安裝 運行建立 運行build_ext 建設 '中的hunspell' 擴展 創建build 創建build/temp.linux-x86_64-3.4 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o hunspell.c:21:22:erreur fatale:hunspell.h:Aucun fichier或者dossier de ce類型 #include ^ 彙編結束。 錯誤:命令 'GCC' 失敗,退出狀態1

---------------------------------------- 

命令 「/根/ anaconda3 /斌/ Python的-u -c」 進口setuptools的,記號化; ='/ tmp/pip-build-oyfpp3iy/hunspell/setup.py'; f = getattr(tokenize,'open',open)(file); code = f.read()。replace(' \ r \ n','\ n'); f。close(); exec(編譯(代碼,文件,'exec'))「install --record /tmp/pip-euhsmasb-record/install-record.txt --single-version-external-managed -compile 「失敗,錯誤代碼1在/ tmp/pip-build-oyfpp3iy/hunspell/ [root @ localhost Bureau]#別名python-devel = python34-devel [root @ localhost Bureau] #pip install hunspell 收集hunspell 使用緩存的hunspell-0.4.1.tar.gz 構建收集包的輪子:hunspell 運行setup.py bdist_wheel進行hunspell ...錯誤 命令的完整輸出/ root/anaconda3/bin/python -u -c「import setuptools ,tokenize; file ='/ tmp/pip-build-xpljhkom/hunspell/setup.py'; f = getattr(tokenize,'open',open)(file); code = f.read()。replace('\ r \ n','\ n'); f.close(); exec(compile(code,file,'exec')) bdist_wheel -d/tmp/tmptwg_9c8vpip-wheel- --python-tag cp34: /root/anaconda3/lib/python3.4/distutils/extension.py:132:UserWarning:Unknown擴展選項:'compile_args','macros' warnings.warn(MSG) 運行bdist_wheel 運行建立 運行build_ext 建築物的hunspell'延伸 創建構建 創建構建/ temp.linux-x86_64-3.4 GCC -pthread -fno嚴格走樣-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -ob uild/temp.linux-x86_64-3.4/hunspell.o hunspell.c:21:22:erreur fatale:hunspell.h:Aucun fichier ou dossier de ce type #include ^ compilationterminée。 錯誤:命令「GCC」失敗,退出狀態1


未能建築輪中的h​​unspell 運行setup.py乾淨的hunspell爲失敗 建設中的hunspell 安裝收集包:中的hunspell 運行的setup.py安裝hunspell ... error 完整的命令輸出/ root/anaconda3/bin/python -u -c「import setuptools,tokenize; file ='/ tmp/pip-build-xpljhkom/hunspell/setup.py'; f = getattr(tokenize,'open',open)(file); code = f.read().excel('\ r \ n','\ n'); f.close(); exec(compile (code,file,'exec'))「install --record /tmp/pip-zrlp2go9-record/install-record.txt --single-version-external-managed --compile: /root/anaconda3/LIB/python3.4 /的distutils/extension.py:132:UserWarning:未知擴展選項: 'compile_args', '宏' warnings.warn(MSG) 運行安裝 運行建立 運行build_ext 建設 '中的hunspell' 擴展 創建build 創建build/temp.linux-x86_64-3.4 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o hunspell.c:21:22:erreur fatale:hunspell.h:Aucun fichier或者dossier de ce類型 #include ^ 彙編結束。 錯誤:命令 'GCC' 失敗,退出狀態1

---------------------------------------- 

命令 「/根/ anaconda3 /斌/ Python的-u -c」 進口setuptools的,記號化; 文件 ='/ tmp/pip-build-xpljhkom/hunspell/setup。py'; f = getattr(tokenize,'open',open)(file); code = f.read()。replace('\ r \ n','\ n'); f.close(); exec(編譯(代碼,文件,'exec'))「install --record /tmp/pip-zrlp2go9-record/install-record.txt --single-version-external-managed -compile」失敗,出錯代碼1 in/tmp/pip-build-xpljhkom/hunspell/

我聽說安裝python3-dev會解決問題。 我試過沒有成功。 我在CentOS 7下使用python 3.4。 請問我可以得到一些幫助嗎?提前致謝。

+0

請顯示錯誤的完整日誌。 – dikkini

+0

我將您的解決方案移至社區wiki答案。 –

回答

0

我剛剛在Centos7 64位上使用了python3.4和pip3.4。 (注意,你需要python3.4和pip3.4)

我終於通過pip3.4工作,但在這之前,我不得不採取一些額外的步驟。步驟我把爲:

安裝python3.4發展標題:

sudo yum install python34u-devel.x86_64 

的hunspell安裝的hunspell和-devel的(需要hunspell.h和LIB的hunspell):

sudo yum install hunspell hunspell-devel 

在在/ usr/lib64下/,添加額外的符號鏈接的庫中的hunspell:

sudo ln -s libhunspell-1.3.so libhunspell.so 

最後,運行以下命令:

sudo pip3.4 install hunspell 

...這給了我下面的輸出:

... (compiler output deleted) ... 
Successfully built hunspell 
Installing collected packages: hunspell 
Successfully installed hunspell-0.4.1 
0

解決方案由OP。

我想通了,我會在這裏分享這個方法,它可以幫助:) 首先你需要安裝Python-devel的和

yum install python-devel 
yum install hunspell-devel 

然後修正你的符號鏈接

cd /usr/lib64 
sudo ln -s libhunspell-1.3.so.0.0.0 libhunspell.so 
ls -l | grep hunspell 

好運:)