Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Error running pip install -r <requirements file> #2865
Python 3.4 / Windows 7 / Powershell / pip version 7.0.3
with stable-req.txt containing requests==2.7.0
results in the following exception:
Reproduced on two pcs and one Windows Server 2008 r2
So I'd guess the req file was encoded in utf16 but python opened it as utf8 (returned from
Not sure what pip could do to improve the user experience on such case ...
Yeah, that's a UTF-16 file. Was it created by redirection in Powershell (
Auto-detecting (guessing) encodings is generally a bad idea, and probably something pip shouldn't get into, but I guess that looking for a BOM when reading the requirements file, and choosing the encoding from that if it's found, would be a useful feature to help with this common Windows issue. (Although it's mainly a Windows issue, the BOM detection can be added for all platforms, as I can't see how it would cause a problem on any other platform).