pip install UnicodeDecodeError: 'gbk' codec can't decode byte 0x98 in position 1051: illegal multibyte sequence
时间: 2023-10-07 11:09:57 浏览: 153
Python UnicodeEncodeError: ‘gbk’ codec can’t encode character 解决方法
5星 · 资源好评率100%
这个错误是由于编码方式不匹配所引起的。Windows10的默认编码方式是utf-8,而Python读入文本文件的默认编码方式是gbk,导致了这个报错。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x98 in position 99: illegal multibyte sequence](https://blog.csdn.net/u013969344/article/details/112131181)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x98 in position 1093: illegal multibyte ...](https://blog.csdn.net/qq_44368508/article/details/126781084)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文