windows10 64位系统,Python3.6环境下安装TensorFlow时报错,错误如下:

问题描述:

windows10 64位系统,Python3.6环境下安装TensorFlow时报错,错误如下:

.....

.....

  File "F:\软件\python3.6.1\lib\site-packages\pip\compat\__init__.py", line 75,
in console_to_str
    return s.decode('utf_8')

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 12: invalid

 continuation byte

经过网上查询得知:导致这一问题的原因就是路径中出现了中文路径【原文】 F:\软件\python3.6.1(确实python路径中有中文),而windows系统是用GBK编码的,因此尝试将pip\compat\__init__.py中出现问题的那一句(也就是报错信息中我用红色标注的)'utf-8'改成‘gbk',问题就解决了。


另一个解决方法就是 卸载现有的Python,然后重新安装,重新安装的目录中不要存在中文就可以了

卸载方法https://jingyan.baidu.com/article/afd8f4debe8df734e386e972.html

猜你喜欢

转载自blog.csdn.net/u010327784/article/details/80953322