本文介绍了pip install pandas提供UnicodeDecodeError:'ascii'编解码器无法解码位置41的字节0xe2:序数不在范围内(128)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Digital Ocean 512MB液滴上执行pip install pandas时,出现错误UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128).

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).

任何想法可能是由什么引起的?我正在运行Ubuntu 12.04 64位.

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

[完全错误]

推荐答案

由于内存不足,gcc似乎被杀死(请参阅暴露了pip中的错误.它在登录时将字节串和Unicode混合在一起,从而导致:

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)

如果可以使用最新的pip版本进行复制;您可以报告错误.

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

这篇关于pip install pandas提供UnicodeDecodeError:'ascii'编解码器无法解码位置41的字节0xe2:序数不在范围内(128)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 04:46