WIN10 Installing the Python Environment Encounters Oserror:raw write ()

Source: Internet
Author: User

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 ()

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.