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

前端 未结 2 429
离开以前
离开以前 2020-12-06 05:13

When performing pip install pandas on a Digital Ocean 512MB droplet, I get the error UnicodeDecodeError: \'ascii\' codec can\'t decode byte 0xe2 in positi

相关标签:
2条回答
  • 2020-12-06 05:19

    It might be a permissions issue. Did you try:

    $ sudo pip install pandas

    0 讨论(0)
  • 2020-12-06 05:30

    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.

    0 讨论(0)
提交回复
热议问题