fxsjy / jieba

结巴中文分词
MIT License
33.41k stars 6.73k forks source link

无法安装,缺少文件 #809

Open efans007 opened 4 years ago

efans007 commented 4 years ago

安装时报错,报错信息如下: error: can't copy 'jieba/lac_small/model_baseline': doesn't exist or not a regular file 版本:0.41

全自动安装: easy_install jieba 或者 pip install jieba / pip3 install jieba 半自动安装:先下载 https://pypi.python.org/pypi/jieba/ ,解压后运行 python setup.py install 两种安装方式都试过了,一样的报错

fxsjy commented 4 years ago

@efans007 什么操作系统,python版本是?

JesseyXujin commented 4 years ago

您好,试下升级setuptools:pip install –upgrade setuptools,之后重新安装jieba: python setup.py install。看下还有没问题。

jacksonlai commented 4 years ago

同样遇到这个问题,无法安装 ERROR: Command errored out with exit status 1: command: /bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdE2hT/jieba/setup.py'"'"'; file='"'"'/tmp/pip-install-gdE2hT/jieba/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-record-lfUdQc/install-record.txt --single-version-externally-managed --compile cwd: /tmp/pip-install-gdE2hT/jieba/ Complete output (39 lines): running install running build running build_py creating build creating build/lib creating build/lib/jieba copying jieba/_compat.py -> build/lib/jieba copying jieba/init.py -> build/lib/jieba copying jieba/main.py -> build/lib/jieba copying jieba/dict.txt -> build/lib/jieba creating build/lib/jieba/finalseg copying jieba/finalseg/prob_emit.py -> build/lib/jieba/finalseg copying jieba/finalseg/prob_start.p -> build/lib/jieba/finalseg copying jieba/finalseg/prob_start.py -> build/lib/jieba/finalseg copying jieba/finalseg/prob_trans.py -> build/lib/jieba/finalseg copying jieba/finalseg/init.py -> build/lib/jieba/finalseg copying jieba/finalseg/prob_trans.p -> build/lib/jieba/finalseg copying jieba/finalseg/prob_emit.p -> build/lib/jieba/finalseg creating build/lib/jieba/analyse copying jieba/analyse/textrank.py -> build/lib/jieba/analyse copying jieba/analyse/tfidf.py -> build/lib/jieba/analyse copying jieba/analyse/init.py -> build/lib/jieba/analyse copying jieba/analyse/analyzer.py -> build/lib/jieba/analyse copying jieba/analyse/idf.txt -> build/lib/jieba/analyse creating build/lib/jieba/posseg copying jieba/posseg/char_state_tab.py -> build/lib/jieba/posseg copying jieba/posseg/prob_emit.py -> build/lib/jieba/posseg copying jieba/posseg/prob_start.p -> build/lib/jieba/posseg copying jieba/posseg/prob_start.py -> build/lib/jieba/posseg copying jieba/posseg/prob_trans.py -> build/lib/jieba/posseg copying jieba/posseg/init.py -> build/lib/jieba/posseg copying jieba/posseg/viterbi.py -> build/lib/jieba/posseg copying jieba/posseg/prob_trans.p -> build/lib/jieba/posseg copying jieba/posseg/prob_emit.p -> build/lib/jieba/posseg copying jieba/posseg/char_state_tab.p -> build/lib/jieba/posseg creating build/lib/jieba/lac_small copying jieba/lac_small/predict.py -> build/lib/jieba/lac_small copying jieba/lac_small/tag.dic -> build/lib/jieba/lac_small error: can't copy 'jieba/lac_small/model_baseline': doesn't exist or not a regular file

ERROR: Command errored out with exit status 1: /bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdE2hT/jieba/setup.py'"'"'; file='"'"'/tmp/pip-install-gdE2hT/jieba/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-record-lfUdQc/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

jacksonlai commented 4 years ago

cetos 7.5 64bit python 2.7.5

fxsjy commented 4 years ago

@efans007 @jacksonlai , 我复现了,是python2.7支持的问题。抱歉我只用python3测试了setup。 现在发布了一个小版本:v0.42.1,你们更新试一下。