When I try to install SenticNet for sentiment analysis using Conda it cannot find it. Then I tried pip install and I got the error:
Collecting senticnet Using cached senticnet-0.3.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "C:\Users\A00220~1\AppData\Local\Temp\pip-build-ez4td4hb\senticnet\setup.py", line 20, in <module>
license=open('LICENSE').read(),
File "C:\Anaconda3\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
181: character maps to <undefined>
I have Anaconda 64-bit, python 3.4.3 and pip 7.0.3
This is due to Python not opening the file as UTF-8 when reading. It appears like Windows does not use Unicode by default so you have to pass in
encoding='utf-8'
to the call to open. Looking at your error code, you need to change line 20 insetup.py
toFor more information, checkout Python's Unicode HOWTO specifically the reading and writing of data.