安装依赖时sentencepiece报错导致无法安装Senta,sentencepiecebug已修复,但senta没有更新依赖

#90 · open · 2 comments

View on GitHub ↗

demeen68

Python 3.8.10 系统MacOS Senta 2.0.0 安装Senta时报错: ```bash Downloading http://mirrors.aliyun.com/pypi/packages/1b/87/c3c2fa8cbec61fffe031ca9f0da512747520bec9be7f886f748457daac31/sentencepiece-0.1.83.tar.gz (497 kB) |████████████████████████████████| 497 kB 972 kB/s ERROR: Command errored out with exit status 1: command: /Users/xq/.conda/envs/pycharm_env/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/lm/34w426114hx95sq_59v1vfn00000gn/T/pip-install-p7t2pty9/sentencepiece_9d01e557b12843c6968415c54cbc6637/setup.py'"'"'; __file__='"'"'/private/var/folders/lm/34w426114hx95sq_59v1vfn00000gn/T/pip-install-p7t2pty9/sentencepiece_9d01e557b12843c6968415c54cbc6637/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/lm/34w426114hx95sq_59v1vfn00000gn/T/pip-pip-egg-info-ht12s8be cwd: /private/var/folders/lm/34w426114hx95sq_59v1vfn00000gn/T/pip-install-p7t2pty9/sentencepiece_9d01e557b12843c6968415c54cbc6637/ Complete output (7 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/lm/34w426114hx95sq_59v1vfn00000gn/T/pip-install-p7t2pty9/sentencepiece_9d01e557b12843c6968415c54cbc6637/setup.py", line 29, in <module> with codecs.open(os.path.join('..', 'VERSION'), 'r', 'utf-8') as f: File "/Users/xq/.conda/envs/pycharm_env/lib/python3.8/codecs.py", line 905, in open file = builtins.open(filename, mode, buffering) FileNotFoundError: [Errno 2] No such file or directory: '../VERSION' WARNING: Discarding http://mirrors.aliyun.com/pypi/packages/1b/87/c3c2fa8cbec61fffe031ca9f0da512747520bec9be7f886f748457daac31/sentencepiece-0.1.83.tar.gz#sha256=d194cf7431dd87798963ff998380f1c02ff0f9e380cc922a07926b69e21c4e2b (from http://mirrors.aliyun.com/pypi/simple/sentencepiece/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ``` 对此,在sentencepiece的项目中对应的issue是:FileNotFoundError: [Errno 2] No such file or directory: '..\\VERSION' #386 对应的网址是:https://github.com/google/sentencepiece/issues/386 在v0.1.86及以上版本已修复,但是Senta没有更新这个依赖,而且在安装时会强制安装sentencepiece==0.1.83,导致出现报错

Comments

marsoyang1

就是版本兼容问题,可以选择从源码安装,亲测安装成功 改下requestments: nltk==3.4.5 numpy==1.23.3 six==1.11.0 scikit-learn==0.24.1 sentencepiece==0.1.86 改下setup.py: install_requires=[ "nltk == 3.4.5", "numpy == 1.23.3", "six == 1.11.0", "scikit-learn == 0.24.1", "sentencepiece == 0.1.86"]

johnren-code

> 就是版本兼容问题,可以选择从源码安装,亲测安装成功 改下requestments: nltk==3.4.5 numpy==1.23.3 six==1.11.0 scikit-learn==0.24.1 sentencepiece==0.1.86 > > 改下setup.py: install_requires=[ "nltk == 3.4.5", "numpy == 1.23.3", "six == 1.11.0", "scikit-learn == 0.24.1", "sentencepiece == 0.1.86"] 大佬,我想问一下你的paddle版本和python版本都是什么呀,我还是报错