python
config_error
ai_generated
true
ERROR: Invalid requirement: 'package==1.0+local' (from line 1 of requirements.txt)
ID: python/pip-install-error-local-version-identifier
80%Fix Rate
83%Confidence
0Evidence
2025-06-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.7 | active | — | — | — |
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
Root Cause
The requirement specifies a local version identifier (e.g., 1.0+local) which is not allowed in requirements files unless the package is available from a local index or direct URL.
generic中文
要求指定了本地版本标识符(例如 1.0+local),除非包来自本地索引或直接 URL,否则在 requirements 文件中不允许使用。
Workarounds
-
85% success
Specify the package with a direct URL: package @ https://example.com/package-1.0+local.tar.gz.
-
80% success
Use a local index: pip install --index-url file:///path/to/index package==1.0+local.
Dead Ends
Common approaches that don't work:
-
70% fail
May install a different version than intended, causing compatibility issues.
-
90% fail
Does not affect local version identifiers; still invalid.