
Replicate Python SDK Broken on httpx — Fix the ImportError or Switch to NexaAPI
If you've recently upgraded your Python environment and started seeing this error: ImportError: cannot import name 'Proxy' from 'httpx' You're not alone. The Replicate Python SDK has a known compatibility issue with newer versions of httpx (tracked in GitHub issue #457 ). Hundreds of developers have been hit by this after upgrading to Python 3.13 or updating their httpx dependency. What's Happening The Replicate Python SDK imports Proxy from httpx internally. When httpx removed or changed the Proxy class in newer versions, the Replicate SDK broke with an ImportError . Affected scenarios: Upgrading Python to 3.13+ Running pip install --upgrade httpx (or any dependency that pulls in a newer httpx) Fresh installs where pip resolves to a newer httpx version Docker containers with updated base images Quick Fix: Pin httpx The fastest workaround is to downgrade httpx: pip install "httpx==0.28.1" replicate ⚠️ Warning: Pinning httpx to an old version may break other libraries in your project (O
Continue reading on Dev.to Python
Opens in a new tab



