[PR #450] import packaging to be compatible with setuptools==70.0.0 #508

Open
opened 2026-10-31 21:15:37 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openai/CLIP/pull/450
Author: @JamieMartin
Created: 6/3/2024
Status: 🔄 Open

Base: main ← Head: packages-fix-2


📝 Commits (3)

  • e5693f4 import packaging to be compatible with setuptools==70.0.0
  • 374b2a3 import packaging to be compatible with setuptools==70.0.0, while also supporting prior setuptools versions
  • a780b46 removing duplicate

📊 Changes

1 file changed (+25 additions, -2 deletions)

View changed files

📝 clip/clip.py (+25 -2)

📄 Description

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)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openai/CLIP/pull/450 **Author:** [@JamieMartin](https://github.com/JamieMartin) **Created:** 6/3/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `packages-fix-2` --- ### 📝 Commits (3) - [`e5693f4`](https://github.com/openai/CLIP/commit/e5693f4006e966782679264cad5240588fbb8969) import packaging to be compatible with setuptools==70.0.0 - [`374b2a3`](https://github.com/openai/CLIP/commit/374b2a3a80c9f552cdff876bd29260744c6cf3c3) import packaging to be compatible with setuptools==70.0.0, while also supporting prior setuptools versions - [`a780b46`](https://github.com/openai/CLIP/commit/a780b46cae2b748bdb9be60ecba35c0bb4b0baa5) removing duplicate ### 📊 Changes **1 file changed** (+25 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `clip/clip.py` (+25 -2) </details> ### 📄 Description 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 . ```python 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) ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openai/CLIP#508
No description provided.