解決pip安裝第三方包編碼錯誤:UnicodeDecodeError: 'ascii' codec can't decode byte....

.../python27/Lib/mimetypes.pypython

在 import以後添加下列內容編碼

if sys.getdefaultencoding() != 'gbk':
    reload(sys)
    sys.setdefaultencoding('gbk')

python2對GBK編碼支持的不友好blog

相關文章
相關標籤/搜索