python pip UnicodeEncodeError: 'ascii' codec can't encode character u'\u258f' in position 8: ordinal

pip 安装numpy 组件时encode 异常
UnicodeEncodeError: 'ascii' codec can't encode character u'\u258f' in position 8: ordinal not in range(128)

度娘捜了下,参考:https://www.v2ex.com/t/90659

具体解决方案:

python目录 Python27\Lib\site-packages 建一个文件sitecustomize.py 

内容写: 
import sys
reload(sys)
sys.setdefaultencoding('gbk')
python会自动运行这个文件。




相关文章:

  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
  • 2021-09-03
猜你喜欢
  • 2021-10-24
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
相关资源
相似解决方案