-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
问题描述
在 Windows 11 国行版执行 python3 setup.py 命令时,出现错误:
Traceback (most recent call last):
File "C:\xxx\setup.py", line 8, in <module>
long_description = (root / "README.md").read_text()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\pathlib.py", line 1135, in read_text
return f.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x8e in position 27: illegal multibyte sequence
解决方案
将代码第八行改为 long_description = (root / "README.md").read_text('utf-8) 即可。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels