python2.7 installation etuptools-36.6.0 ASCII ' codec can ' t decode byte 0xce in position 7 issues

Source: Internet
Author: User

workaround 1:

Original link: http://blog.csdn.net/all_over_servlet/article/details/45112221

Modify the DEF join (path, *paths) function in the file to modify the D:\Python27\Lib\ntpath.py (location is determined by the personal Python installation directory) in GBK, and add the first line within the function

Reload (SYS)  

That

#Join (or more) paths. defJoin (PATH, *paths):"""Join or more pathname components, inserting "\ \" as needed."""Reload (SYS) sys.setdefaultencoding (' GBK ')  )  result_drive, Result_path=splitdrive (path) forPinchpaths:p_drive, P_path=splitdrive (P)ifP_path andP_PATH[0]inch '\\/':              #Second Path is absolute            ifP_driveor  notresult_drive:result_drive=p_drive Result_path=P_pathContinue          elifP_drive andP_drive! =result_drive:ifP_drive.lower ()! =result_drive.lower ():#Different drives = Ignore the first path entirelyResult_drive =p_drive Result_path=P_pathContinue              #same Drive in different caseResult_drive =p_drive#Second Path is relative to the first        ifResult_path andRESULT_PATH[-1] not inch '\\/': Result_path= Result_path +'\\'Result_path= Result_path +P_path## Add separator between UNC and Non-absolute path    if(Result_path andRESULT_PATH[0] not inch '\\/'  andresult_drive andResult_drive[-1:]! =':'):          returnResult_drive + Sep +Result_pathreturnResult_drive + Result_path

Solution 2: (PS: This is the most online solution of the post, not necessarily able to solve, the landlord himself is in accordance with the resolution of 1 solved the problem)

Note the Python syntax indentation principle.

python2.7 installation etuptools-36.6.0 ASCII ' codec can ' t decode byte 0xce in position 7 issues

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.