ImageReward icon indicating copy to clipboard operation
ImageReward copied to clipboard

'gbk' codec can't decode byte 0xa2 in position 116

Open aswordok opened this issue 9 months ago • 1 comments

(4bit) D:+AI\myComfyUI\tmp\ImageReward>pip install . Processing d:+ai\mycomfyui\tmp\imagereward Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [12 lines of output] D:+AI\myComfyUI\tmp\ImageReward\setup.py:3: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources Traceback (most recent call last): File "", line 2, in File "", line 34, in File "D:+AI\myComfyUI\tmp\ImageReward\setup.py", line 6, in long_description = (Path(file).parent / "README.md").read_text() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:+AI\miniconda3\envs\4bit\Lib\pathlib.py", line 1028, in read_text return f.read() ^^^^^^^^ UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 116: illegal multibyte sequence [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Although the readme recommends installing with pip install image-reward, this timm locks =0.6.13 and creates headaches for me when installing deepcompressor later, so I still want to try installing it from source.

aswordok avatar Mar 07 '25 00:03 aswordok

windows 下: 手工安装两种方法解决: 打开 ImageReward 的 README.md ,另存为 ansi。

另一种解决方法是打开 ImageReward 的 setup.py 修改这一行 long_description = (Path(file).parent / "README.md").read_text() 中的.read_text()为.read_text(encoding="utf-8")

直接 pip install image-reward 安装仍然出错,没法解决。

aswordok avatar Apr 02 '25 07:04 aswordok