我正在尝试使用senticnet
python 3.5
在windows 8
pip
上安装pip install senticnet
,如下所示:
Using cached senticnet-1.0.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\2017\AppData\Local\Temp\pip-build-bzamjfpz\senticnet\setup.py", line 20, in <module>
license=open('LICENSE').read(),
File "f:\python35\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 186 : character maps to <undefined>
----------------------------------------
在安装结束时,我收到此错误:
setup.pip
我在Installing SenticNet package on Anaconda gives UnicodeDecodeError中尝试了建议的解决方案,但我找不到org.springframework.data.annotation.Id
文件。
任何人都可以帮助我吗?
答案 0 :(得分:0)
问题在于编码。 打开“setup.py”,找到“license = open('LICENSE')。read()”,在open方法中添加“encoding ='latin-1'”。即: license = open('LICENSE',encoding ='latin-1')。read() 它对我有用。