openai / CLIP

CLIP (Contrastive Language-Image Pretraining), Predict the most relevant text snippet given an image
MIT License
26.19k stars 3.34k forks source link

import packaging to be compatible with setuptools==70.0.0 #450

Open JamieMartin opened 5 months ago

JamieMartin commented 5 months ago

As described in Issue #446, there is a change from setuptools 70.0.0 which causes breaking behaviour. This fix resolves this issue while maintaining backward compatibility for the import. Another option is to force usage of setuptools 70.0.0 which is provided in #449 .

File ~/python3.12/site-packages/clip/clip.py:6
      5 from typing import Any, Union, List
----> 6 from pkg_resources import packaging
      8 import torch

ImportError: cannot import name 'packaging' from 'pkg_resources' (~/python3.12/site-packages/pkg_resources/__init__.py)