'gbk' codec can't decode byte 0xa2 in position 116
(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 "
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.
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 安装仍然出错,没法解决。