Failed to import transformers.models.clip.image_processing_clip because of the following error (look up to see its traceback): module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at

如图所示,推测原因可能是numpy版本太低了。
当前版本1.24.4

改到1.20.1好了:


但是出现新的错误了。。吐血
解决transformers中image_processing_clip导入问题:numpy版本升级与新错误,
文章讲述了在尝试导入transformers.models.clip时遇到的错误,原因是numpy的`np.object`被弃用,需将版本从1.24.4降级至1.20.1。然而,降级后出现了新的错误,暗示升级过程中可能存在的兼容性问题。
2974

被折叠的 条评论
为什么被折叠?



