首页 > 解决方案 > python -m 在公司代理后面

问题描述

我在我的.bashrc(HTTP_PROXY、HTTPS_PROXY 及其小写变体)中设置了所有代理环境变量,并且所有必需的主机都已作为例外添加到代理服务器,包括github.com,但是当我发出时,python -m spacy download en我得到:

Collecting en_core_web_sm==2.1.0 from https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz#egg=en_core_web_sm==2.1.0
  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: 403 Forbidden',))': /84940268/85ec3200-48aa-11e9-9878-337412e36828?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190513%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190513T164037Z&X-Amz-Expires=300&X-Amz-Signature=27c4af0fcb6043dba9efa4f7f4be7aced7af7fba51208a31e9737b59403e3e99&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Den_core_web_sm-2.1.0.tar.gz&response-content-type=application%2Foctet-stream

等等

注意:git clone工作正常pip install,等等。

不知道为什么通过安装python -m会有问题。在我所做的任何搜索中,都没有要使用的环境变量配置信息python -m,所以不确定交易是什么?

标签: pythonproxy

解决方案


推荐阅读