当前位置:网站首页>UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x98 in position 1093: illegal multibyte sequence
UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x98 in position 1093: illegal multibyte sequence
2022-07-04 04:24:00 【Live like yourself】
It's not whether you also encountered this error .
If there is , So you're in the right place , Solve the problem once and for all .
without , You can also stop and have a look , In order to better solve possible problems in the future .
Catalog
The cause of the matter
It's in use python Problems encountered when installing third-party libraries , for example :pip install XXX
There was no problem before , Know once , That's the problem , But I don't remember changing the settings about coding ,,,
therefore ~~~
I started searching all over the browser , Of course , Also found a lot of solutions .
for example :
According to the error position , Index step by step , Until you find the place to open the file , hold encoding= Parameter set to ‘utf8’, Or other Chinese character sets ( Everything ).
reinstall pip...
Reset the system default encoding character set ...
notes : It is not recommended to try any of the above methods .
First, it cannot fundamentally solve the problem .
Second, some methods can't solve the problem at all .

Cause analysis
I don't say much nonsense , Get down to business :
The reason is the problem of the encoding and decoding method of the system ( Because I tried , hold pip Reinstallation still won't solve the problem 【 At that time, it was suspected that it was relying on conflict , So I put anaconda It was reinstalled ~~~】, But none of them solved the problem )
therefore !!!
We need to change the encoding and decoding method of the system .
resolvent
Add environment variables
As shown in the figure : stay System environment Add the following variables to .


The last step : Restart the computer !( It won't work without a restart )
review
Don't modify the source code of the library too much , Not a long-term practice , Not necessarily right , Unless it's the operating system .
QQ:1757093754
Welcome to exchange ! Study !
边栏推荐
- Two commonly used graphics can easily realize data display
- 10 reasons for not choosing to use free virtual hosts
- Restore the subtlety of window position
- Storage of MySQL database
- 统计遗传学:第三章,群体遗传
- [Yugong series] go teaching course 002 go language environment installation in July 2022
- Idea configuration 360zip open by default -- external tools
- JS realizes the effect of text scrolling marquee
- Distributed system: what, why, how
- Tcp- simple understanding of three handshakes and four waves
猜你喜欢

Unity draws the trajectory of pinball and billiards

2020 Bioinformatics | TransformerCPI

Leetcode brush questions: binary tree 05 (flip binary tree)

96% of the collected traffic is prevented by bubble mart of cloud hosting

Flink学习6:编程模型

Flink learning 7: application structure

LNK2038 检测到“RuntimeLibrary”的不匹配项: 值“MD_DynamicRelease”不匹配值“MDd_DynamicDebug”(main.obj 中)

【CSRF-01】跨站请求伪造漏洞基础原理及攻防

Parameterization of controls in katalon

leetcode刷题:二叉树04(二叉树的层序遍历)
随机推荐
Three years of graduation, half a year of distance | community essay solicitation
Leetcode skimming: binary tree 08 (maximum depth of n-ary tree)
软件测试是干什么的 发现缺陷错误,提高软件的质量
Operation of ES6
R语言中如何查看已安装的R包
What does software testing do? Find defects and improve the quality of software
【CSRF-01】跨站请求伪造漏洞基础原理及攻防
Restore the subtlety of window position
2020 Bioinformatics | TransformerCPI
The difference between bagging and boosting in machine learning
leetcode刷题:二叉树04(二叉树的层序遍历)
如何远程办公更有效率 | 社区征文
There is a problem that the package cannot be parsed in the like project
RHCSA 07 - 用户与群组管理
C language bidirectional linked list first edition
Flink learning 8: data consistency
Perf simple process for multithreaded profile
资深开发人员告诉你,怎样编写出优秀的代码?
(指针)自己写一个比较字符串大小的函数,功能与strcmp类似。
Configuration and hot update of nocturnal simulator in hbuildx