修复ComfyUI启动时报错module ‘pkgutil’ has no attribute ‘ImpImporter’问题

问题描述

我们在安装ComfyUI某些插件的时候,会使用到pkgutil.ImpImporter这个废弃的类,由于 Python 3.12 正式移除了 pkgutil.ImpImporter。所以这个时候启动软件报一下错:

AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

解决方法

打开命令行cmd,运行下面的代码(将环境路径改为你真实的Comfyui的python路径)

H:\ComfyUI\python_embeded\python.exe get-pip.py
H:\ComfyUI\python_embeded\python.exe -m pip install --upgrade setuptools

Image
© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容