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

Also available as: JSON · Markdown · 中文
80%Fix Rate
83%Confidence
0Evidence
2025-06-05First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
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

  1. 85% success
    Specify the package with a direct URL: package @ https://example.com/package-1.0+local.tar.gz.
  2. 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:

  1. 70% fail

    May install a different version than intended, causing compatibility issues.

  2. 90% fail

    Does not affect local version identifiers; still invalid.