How to set proxy in python -m download call?

Viewed 283

im currently trying to upgrade my version of spacy from 2.2.5 to 2.3.1. after running:

python -m spacy download en_core_web_sm

I see

Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': /explosion/spacy-models/releases/download/en_core_web_sm-2.3.1/en_core_web_sm-2.3.1.tar.gz

I have my http_proxy, https_proxy, HTTP_PROXY, HTTPS_PROXY environment variables all set to my proxy but that doesnt seem to work. I took a guess and tried:

python -m spacy download en_core_web_sm --proxy http://myproxy:proxyport

but im still getting the same error so i guess it didnt work?

So how can i set a proxy before making this call, or set it along with the call as a one-time-use kind of deal?

its weird to me because running:

pip3 install -U spacy

worked just fine.

0 Answers
Related