python
install_error
ai_generated
true
error: can't copy 'PKG-INFO': doesn't exist or not a regular file
ID: python/pip-setup-py-egg-info-failed
80%Fix Rate
82%Confidence
0Evidence
2024-07-22First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.7 | active | — | — | — |
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
Root Cause
The source distribution is missing the PKG-INFO file, often due to incomplete sdist creation or a corrupted download. setuptools expects this file during installation.
generic中文
源代码分发包缺少 PKG-INFO 文件,通常是由于 sdist 创建不完整或下载损坏导致。setuptools 在安装过程中需要此文件。
Workarounds
-
80% success
Download the package from PyPI manually and inspect the tarball; if corrupted, re-download. Alternatively, install from a wheel if available: pip install package.whl.
-
85% success
Install directly from the source repository: pip install git+https://github.com/user/repo.git.
Dead Ends
Common approaches that don't work:
-
85% fail
If PKG-INFO is missing from the sdist, egg_info cannot generate it without the proper source files.
-
90% fail
The issue is with the package source, not setuptools itself.