Create: ATLAS/IT Notes/pip-proxy-configuration.md
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
---
|
||||
created: '2026-04-08T22:37:28+00:00'
|
||||
id: a58649bc-3317-4834-976b-114e3e741b93
|
||||
keywords:
|
||||
- pip
|
||||
- proxy
|
||||
- python
|
||||
- trusted-host
|
||||
- pypi
|
||||
- environment variables
|
||||
- mitmproxy
|
||||
- Cogent
|
||||
- Anaheim
|
||||
- package installation
|
||||
links: []
|
||||
modified: '2026-04-08T22:37:28+00:00'
|
||||
summary: Configuration for pip package installations in slow network environments
|
||||
using local proxy with mitmproxy.
|
||||
tags:
|
||||
- python
|
||||
- pip
|
||||
- proxy
|
||||
- troubleshooting
|
||||
title: 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:
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
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
|
||||
Reference in New Issue
Block a user