mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[PR #536] When installing CLIP via pip on Python 3.10+ systems with setuptools … #528
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#528
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/openai/CLIP/pull/536
Author: @Aadi775
Created: 3/22/2026
Status: 🔄 Open
Base:
main← Head:patch-1📝 Commits (1)
41e8420When installing CLIP via pip on Python 3.10+ systems with setuptools 71+, the installation fails with:ModuleNotFoundError: No module named 'pkg_resources'📊 Changes
1 file changed (+3 additions, -4 deletions)
View changed files
📝
setup.py(+3 -4)📄 Description
…71+, the installation fails with:
ModuleNotFoundError: No module named 'pkg_resources'Problem
When installing CLIP via pip on Python 3.10+ systems with setuptools 71+, the installation fails with:
pip creates an isolated build environment in a temporary directory when building packages from source. In this isolated environment, setuptools is installed fresh — and in newer versions (71+),
pkg_resourcesis no longer automatically available as a top-level importable module within that subprocess context, even though setuptools itself is present.The original
setup.pyimportedpkg_resourcesat the module level and usedpkg_resources.parse_requirements()to readrequirements.txt. Since this code runs inside pip's isolated build subprocess, it fails before the wheel can even be built — making CLIP completely uninstallable from source on modern systems without workarounds.Closes #532
What Changed
Before:
After:
pkg_resourcesimport entirelyparse_requirements()with plain Python file I/O" # comment"are correctly excluded (previous version missed these)install_requiresImpact
pkg_resourcesdependency fromsetup.py🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.