`pip install pandas` gives UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128)
11,549
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.
Related videos on Youtube
Author by
Athena Wisdom
Updated on September 15, 2022Comments
-
Athena Wisdom over 1 year
When performing
pip install pandas
on a Digital Ocean 512MB droplet, I get the errorUnicodeDecodeError: '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.
-
Athena Wisdom over 10 years@Blender just added to the original post
-
Blender over 10 yearsHow much RAM do you have on your VPS? GCC is being killed by the OS, which probably means that you ran out of RAM while compiling. Either add a swap partition or just install Pandas via apt-get:
sudo apt-get install python-pandas
. -
DSM over 10 yearsYeah, stuff like this has happened in similar situations to other people.
-
-
TheGrimmScientist over 8 yearsand to upgrade,
pip install --upgrade pip
(upgrading fixed this for me) -
Sam almost 8 yearsOn ubuntu I could not upgrade pip until I removed the ubuntu package using
apt-get remove python-pip
and then running the above upgrade code.