# ERROR: Invalid requirement: 'http://example.com/package.zip' - Expected file://, https://, or a valid package name.

- **ID:** `pip/url-invalid-requirement-scheme`
- **Domain:** pip
- **Category:** config_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

pip does not support plain HTTP URLs for package installation due to security reasons; only HTTPS, file://, or package names are allowed.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 21.0 | active | — | — |
| pip 22.0 | active | — | — |
| pip 23.0 | active | — | — |
| pip 24.0 | active | — | — |

## Workarounds

1. **Change the URL to HTTPS: pip install https://example.com/package.zip (if HTTPS is available).** (90% success)
   ```
   Change the URL to HTTPS: pip install https://example.com/package.zip (if HTTPS is available).
   ```
2. **Download the file manually and install from local: wget http://example.com/package.zip && pip install ./package.zip** (95% success)
   ```
   Download the file manually and install from local: wget http://example.com/package.zip && pip install ./package.zip
   ```
3. **Use a local file server with HTTPS or serve over file://: pip install file:///path/to/package.zip** (85% success)
   ```
   Use a local file server with HTTPS or serve over file://: pip install file:///path/to/package.zip
   ```

## Dead Ends

- **** — The --trusted-host flag only affects index URLs, not direct URL requirements; the error remains. (90% fail)
- **** — Same validation applies to requirements files; pip rejects HTTP URLs everywhere. (100% fail)
- **** — The --no-deps flag does not change URL scheme validation; still fails. (100% fail)
