设置:
Python 3.9。5 Anaconda 3 2021.11 Windows 10
每当我尝试安装spacy(pip install spacy
)时,我都会得到一个:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000175C6A0DA30>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/spacy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000175C6A0DC10>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/spacy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000175C6A0DAC0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/spacy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000175C6A0D730>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/spacy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000175C6A13790>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/spacy/
ERROR: Could not find a version that satisfies the requirement spacy (from versions: none)
ERROR: No matching distribution found for spacy
我也尝试过(pip安装-U-spacy
)
另一种方法是:
pip install -U pip setuptools wheel
pip install -U spacy
python -m spacy download en_core_web_sm
也失败了。
请帮帮我。
确保已使用以下配置代理:
export http_proxy=http://{username}:{password}@{server_address}:{port}
或
export http_proxy=http://{server_address}:{port}
或直接与pip:
pip install spacy --proxy=http://{the-proxy-adress-with-port-and-auth}