Python-pip安装库提示UnicodeDecodeError错误

原文链接:点击打开链接

问题描述: 
Win10系统(家庭中文版)在Windows Powershell(管理员)环境下使用pip安装keras提示UnicodeDecodeError错误

解决方法:

1、进入Windows Powershell

2、输入命令CHCP,查看“当前代码页”(由于系统为预装的Windows 10 家庭中文版,“当前代码页”为936,简体中文)

3、输入CHCP 65001,修改“当前代码页”为UTF-8

chcp 437        /* 英文 */ 

chcp 932        /* 日文 */ 

chcp 936        /* 简体中文 */ 

chcp 949        /* 韩文 */ 

chcp 950        /* 繁体中文 */ 

chcp 65001      /* UTF-8 */
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

4、不用重启,继续使用pip安装即可

参考资料: 
1. https://blog.csdn.net/sunyx1130/article/details/51075514 
2. https://blog.csdn.net/sanwu2010/article/details/34857525 
3. https://blog.csdn.net/lixiaolong521999/article/details/70046489

附加:

如何进入Windows Powershell?

1.按下“windows徽标键+R”,打开“运行”程序窗口。

  2.在打开的运行界面中,输入“powershell”,并点击“确定”,如图1所示:

图1 运行界面输入“powershell”

图1 运行界面输入“powershell”

  3.此时,出现powershell.exe界面,如图2所示:

图2 Windows powershell程序窗口

图2 Windows powershell程序窗口

参考: 点击打开链接

猜你喜欢

转载自blog.csdn.net/akenseren/article/details/80653117
今日推荐