Conemu: Python 2.7 pip install fails with "Illegal byte sequence"

Created on 2 Sep 2018  路  8Comments  路  Source: Maximus5/ConEmu

ConEmu build: 180626 x64
OS version: Windows 10 x64
Used shell version: CMD

Python 2.7's pip fails when CMD runs under ConEmu:

C:\Users\User1>pip install Kivy --upgrade
Collecting Kivy
Downloading https://files.pythonhosted.org/packages/f7/98/d74b2c19eb28dcf36450c979c19676741891ca8
a54af0a7069e445552663/Kivy-1.10.1-cp27-cp27m-win_amd64.whl (4.3MB)
1% |Could not install packages due to an EnvironmentError: [Errno 42] Illegal byte sequence

This can be worked around by adding "--progress-bar off", but inconvenient, and problematic for novice users ...

other-3rd-party

Most helpful comment

for me changing the code page to ANSI worked. e.g.:
chcp 1255

All 8 comments

Have you checked that without ConEmu? With the same codepage selected in the console?

Yes, and strangely enough, it happens without ConEmu as well. What's even strange that I'm sure I got this errors only since I installed ConEmu, and trying to reproduce it on a similar configuration (Same win10x64, same codepage - cp862) worked fine.
Any idea how can I find the source?

I don't believe that ConEmu may be a source of the problem, because it happens outside of ConEmu (as you said). I think you have either installed some Windows update or other third-party tools which causes the problem.

https://conemu.github.io/en/ThirdPartyProblems.html

Try to compare your environment variables, especially the PATH.
Also, the ProcessMonitor may be useful in your case.

Thanks!

The bug in the pip repo - https://github.com/pypa/pip/issues/5665

for me changing the code page to ANSI worked. e.g.:
chcp 1255

For me:
pip install <package> --progress-bar off

Thanks g3rzi, I'm familiar with this workaround

I actually went for a more profound solution / workaround - I switched to Linux at last :)

Was this page helpful?
0 / 5 - 0 ratings