Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Installation can fail in Python3 in Windows due to UnicodeDecodeError #112
$ pip install wrapt
Will fail in Windows using a Visual Studio in some languages, because it will try to output some accented characters, and pip will fail with
The failure is in
if sys.version_info >= (3,): def console_to_str(s): try: return s.decode(sys.__stdout__.encoding) except UnicodeDecodeError: return s.decode('utf_8')
I have just workarounded it with:
if sys.version_info >= (3,): def console_to_str(s): try: return s.decode(sys.__stdout__.encoding) except UnicodeDecodeError: try: return s.decode('utf_8') except Exception as e: return "Cannot decode this string"
It seems this will be improved in pip 10 (not yet released): pypa/pip#4110 (comment)
If a workaround is possible, that would be great. I didn't submit the issue asking for a fix, but more like as information for users, trying to contribute with a possible workaround. So, until pip 10 is released, this is an open issue for wrapt users, and it shouldn't be closed, IMHO.
This was referenced
Nov 28, 2017
Please. need patch there! :)
have fresh python install 3.6.3 on my windows 10 and got the same error trying to use pylint plugin on IDE visual code , editor try to autoinstall on my new virtualenv pylint using python.exe for env
Just was a problem with symlinks from combination of windows10+gitSCM tools , just open Git Bash prompt and install it !
referenced this issue
Apr 4, 2018
Any news on this?
I have to disagree :), I think that yes, it is a pip issue. While it is installing a python package with native extension, if the compiler building the extension outputs some message with localized characters, pip is completely aborting installation. And that package won't install correctly, because pip is not resilient to encoding errors in an output that is irrelevant for the pip functioning.
It would be great if pip 10 was out of beta and become mainstream, any roadmap for this? Thanks!