Configuration file contains invalid cp936 characters in

执行pip install djangorestframework-jwt的时候报错:
Configuration file contains invalid cp936 characters in C:\Users\gly89\pip\pip.ini
仔细回想,发现为了加快pip下载模块的速度,新建了pip.ini文件,添加了global的index-url设置

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn #设置为国内源

打开文件,明显找出造成此次pip安装报错的原因,就是里面的中文注释,删除“#设置为国内源”,pip install djangorestframework-jwt恢复正常

You may also like...

发表评论