1.3 KiB
1.3 KiB
created, id, keywords, links, modified, summary, tags, title
| created | id | keywords | links | modified | summary | tags | title | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2026-04-08T22:37:28+00:00 | a58649bc-3317-4834-976b-114e3e741b93 |
|
2026-04-08T22:37:28+00:00 | Configuration for pip package installations in slow network environments using local proxy with mitmproxy. |
|
Pip Proxy Configuration |
Pip Package Installation Proxy Configuration
Problem
Pip direct installs were very slow in a colo-hosted environment (Cogent in Anaheim).
Solution
For pip users
Run pip with proxy settings using the --proxy flag:
pip install --proxy http://10.0.10.10:8080 --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org <package_name>
For UV users
Set environment variables before running commands:
export ALL_PROXY=http://123.123.123.123:8080
Also applicable: HTTP_PROXY, HTTPS_PROXY
Notes
- Proxy configuration runs on a Windows machine
- MITMproxy was used as the local proxy server
- Multiple trusted-host flags are needed for various PyPI endpoints
Related Information
- Location: Cogent data center, Anaheim
- Tool: mitmproxy
Created: 2025-01-28
Archived from: root-level date file