`pip install pandas` gives UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128)

浪子不回头ぞ 提交于 2019-11-26 23:13:44

问题


When performing pip install pandas on a Digital Ocean 512MB droplet, I get the error UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128) .

Any ideas what may have caused it? I'm running Ubuntu 12.04 64bit.

[Full Error]


回答1:


It looks like gcc being killed due to insufficient memory (see @Blender's comment) exposed a bug in pip. It mixes bytestrings and Unicode while logging that leads to:

>>> '\n'.join(['bytestring with non-ascii character ☺', u'unicode'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: \
   ordinal not in range(128)

If it is reproducible with the latest pip version; you could report the bug.




回答2:


It might be a permissions issue. Did you try:

$ sudo pip install pandas



来源:https://stackoverflow.com/questions/20555761/pip-install-pandas-gives-unicodedecodeerror-ascii-codec-cant-decode-byte-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!