[PR #449] [MERGED] import packaging to be compatible with setuptools==70.0.0 #507

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

📋 Pull Request Information

Original PR: https://github.com/openai/CLIP/pull/449
Author: @JamieMartin
Created: 6/3/2024
Status: ✅ Merged
Merged: 6/4/2024
Merged by: @jongwook

Base: main ← Head: packages-fix


📝 Commits (2)

  • e5693f4 import packaging to be compatible with setuptools==70.0.0
  • 3e6026f importing the version module

📊 Changes

2 files changed (+5 additions, -4 deletions)

View changed files

📝 clip/clip.py (+4 -4)
📝 requirements.txt (+1 -0)

📄 Description

As described in Issue #446 (https://github.com/openai/CLIP/issues/446), there is a change from setuptools 70.0.0 which causes breaking behaviour. This change fixes this. However, it will force the usage of setuptools 70.0.0.

In another PR, I've offered a solution which checks the version, which provides backward compatibility - #450

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/449 **Author:** [@JamieMartin](https://github.com/JamieMartin) **Created:** 6/3/2024 **Status:** ✅ Merged **Merged:** 6/4/2024 **Merged by:** [@jongwook](https://github.com/jongwook) **Base:** `main` ← **Head:** `packages-fix` --- ### 📝 Commits (2) - [`e5693f4`](https://github.com/openai/CLIP/commit/e5693f4006e966782679264cad5240588fbb8969) import packaging to be compatible with setuptools==70.0.0 - [`3e6026f`](https://github.com/openai/CLIP/commit/3e6026fd41b389e514f2618029bf5d6be20ead62) importing the version module ### 📊 Changes **2 files changed** (+5 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `clip/clip.py` (+4 -4) 📝 `requirements.txt` (+1 -0) </details> ### 📄 Description As described in Issue #446 (https://github.com/openai/CLIP/issues/446), there is a change from setuptools 70.0.0 which causes breaking behaviour. This change fixes this. However, it will force the usage of setuptools 70.0.0. In another PR, I've offered a solution which checks the version, which provides backward compatibility - #450 ```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>
bsakaguchi 2026-10-31 21:15:36 +00:00
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#507
No description provided.