最近使用pip install总出现出现UnicodeEncodeError: 'gbk' codec can't encode character错误,解决办法为:
在python安装目录下Python27\Lib\site-packages新建一个python文件sitecustomize.py 内容为:
import sys sys.setdefaultencoding('gb2312')
然后重新运行pip install,问题解决。
最近使用pip install总出现出现UnicodeEncodeError: 'gbk' codec can't encode character错误,解决办法为:
在python安装目录下Python27\Lib\site-packages新建一个python文件sitecustomize.py 内容为:
import sys sys.setdefaultencoding('gb2312')
然后重新运行pip install,问题解决。
转载于:https://www.cnblogs.com/makeiteasy/p/8616620.html