windows上pip install 報編碼錯誤

報錯:UnicodeDecodeError: 'ascii' codec can't decode byte 0xb1 in position 34: ordinal
not in range(128)python

解決方式:編碼

在python安裝目錄下Python26\Lib\site-packages新建一個文件,文件名爲:sitecustomize.pycode

文件內容爲:ip

import sys

sys.setdefaultencoding('utf-8')

python會自動加載這個文件,進而更改編碼。utf-8

進行pip install 問題解決ci

相關文章
相關標籤/搜索