[英]Unicode Decode Error installing Senticnet using pip
Trace: 跟踪:
ERROR: Command errored out with exit status 1:
command: /home/geancarlo/Github/trolls_clasificator/venv/bin/python3.6 -c
'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-wftowpu8/senticnet/setup.py'"'"';
__file__='"'"'/tmp/pip-install-wftowpu8/senticnet/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 pip-egg-info
cwd: /tmp/pip-install-wftowpu8/senticnet/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-wftowpu8/senticnet/setup.py", line 20, in <module>
license=open('LICENSE').read(),
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 10: ordinal not in range(128)
---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for
full command output.
I'm trying to install Senticnet with pip
using a venv of Python 3. Some help? 我正在尝试使用Python 3的venv通过
pip
安装Senticnet 。有帮助吗? :( :(
File "/tmp/pip-install-wftowpu8/senticnet/setup.py", line 20, in <module> license=open('LICENSE').read(), File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 10: ordinal not in range(128)
Character 12 of senticnet's LICENSE is indeed non-ascii: ©; sendicnet许可的字符12确实不是ascii:©; but it installs fine for me.
但这对我来说很好。
The problematic code, open('LICENSE').read()
, as noted in pip's bug report , uses encoding derived from the system settings, which is ASCII on your machine. 如pip的错误报告中所述 ,有问题的代码
open('LICENSE').read()
使用从系统设置派生的编码,该编码是您计算机上的ASCII。
On *nix running export LC_ALL=en_US.UTF-8
before pip install
should fix this. 在* nix上运行
export LC_ALL=en_US.UTF-8
进行pip install
之前,应该可以解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.