The previous article mentioned in the Python code to always do error, is not the problem of their own code, the original is win10 problem, Windows engaged in development really need a lot of patience, interested can refer to this to deal with: Python3 met Win10 Pit
This time again encountered PIP installation package report OSError, how to deal with it?
PIP Install requests
Oserror:raw write () returned invalid length 134 (should has been between 0 and 92)
Actually also simple, a command to take care of OH:
Chcp 65001
Active Code page:65001
The installation will be smooth and successful!
PIP Install requests
Successfully installed certifi-2018.4.16 chardet-3.0.4 idna-2.7 requests-2.19.1 urllib3-1.23
Why is it?
Because of the encoding of the terminal, the WIN10 environment, the Pycharm Terminal Terminal Code is 936, that is, the United States Code. To view the available commands:
Chcp
936
Use chcp 65001 to change to UTF-8 encoding
This bug see: https://bugs.python.org/issue32245#msg308012
WIN10 Installing the Python Environment Encounters Oserror:raw write ()