我想为我的 Tts 项目下载imit3,但我总是收到错误消息
File "C:\Python311\Lib\pathlib.py", line 1059, in read_text
return f.read()
^^^^^^^^
File "C:\Python311\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 707: character maps to <undefined>
我尝试使用 PyPI 和
pip install mycroft-mimic3-tts
安装,尝试了 set PYTHONUTF8=1
和 set LANG=utf-8
,然后我从 GitHuB 下载了该文件夹并尝试使用 pip install -r requirements.txt
安装,但没有任何效果。
在setup.py中它是使用utf-8解码的,所以我没有得到这个问题。
# Load README in as long description
long_description: str = ""
readme_path = this_dir / "README.md"
if readme_path.is_file():
long_description = readme_path.read_text(encoding="utf-8")
requirements = []
requirements_path = this_dir / "requirements.txt"
if requirements_path.is_file():
with open(requirements_path, "r", encoding="utf-8") as requirements_file:
requirements = requirements_file.read().splitlines()
version_path = module_dir / "VERSION"
with open(version_path, "r", encoding="utf-8") as version_file:
version = version_file.read().strip()
感谢您的帮助