python error "module 'sys' has no attribute 'setdefaultencoding'"

以前在sitecustomize.py(site-packages\sitecustomize.py)文件中设置过默认编码,但python3.4不再支持了(Starting python 3.4, this function is no longer available)

所以不能再调用 sys.setdefaultencoding, 注释掉即可

 

C:\Users\xuetangx\AppData\Local\Programs\Python\Python36\Lib>python -m django

Error in sitecustomize; set PYTHONVERBOSE for traceback:
AttributeError: module 'sys' has no attribute 'setdefaultencoding'

 

posted @ 2019-11-22 16:57  alxe_yu  阅读(245)  评论(0)    收藏  举报