详细报错内容:
(fnProject) PS C:\Users\asus> pip install hanlp
Collecting hanlp
Using cached hanlp-2.0.0a42.tar.gz (132 kB)
Collecting tensorflow==2.1.0
Using cached tensorflow-2.1.0-cp37-cp37m-win_amd64.whl (355.8 MB)
Collecting fasttext==0.9.1
Using cached fasttext-0.9.1.tar.gz (57 kB)
Collecting bert-for-tf2==0.12.7
Using cached bert-for-tf2-0.12.7.tar.gz (39 kB)
ERROR: Command errored out with exit status 1:
command: 'D:\CONDA\envs\fnProject\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\asus\\AppData\\Local\\Temp\\pip-install-vx2_ryn2\\bert-for-tf2\\setup.py'"'"'; __file__='"'"'C:\\Users\\asus\\AppData\\Local\\Temp\\pip-install-vx2_ryn2\\bert-for-tf2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\asus\AppData\Local\Temp\pip-install-vx2_ryn2\bert-for-tf2\pip-egg-info'
cwd: C:\Users\asus\AppData\Local\Temp\pip-install-vx2_ryn2\bert-for-tf2\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\asus\AppData\Local\Temp\pip-install-vx2_ryn2\bert-for-tf2\setup.py", line 21, in <module>
long_description = fh.read()
UnicodeDecodeError: 'cp950' codec can't decode byte 0xa0 in position 8481: illegal multibyte sequence
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
System information
- OS Platform: Windows 10 64bit
- Python version:Python 3.7.7
- HanLP version:
看来是UnicodeDecodeError的问题
网上解决方法为修改开档方式
但是依照路径寻找却找不到该档案
请问要如何解决,万分感谢!