无法通过 pip 安装 Spacy [重复]
Posted
技术标签:
【中文标题】无法通过 pip 安装 Spacy [重复]【英文标题】:Failing to install Spacy via pip [duplicate] 【发布时间】:2022-01-22 23:41:02 【问题描述】:设置:
Python 3.9.5 蟒蛇 3 2021.11 视窗 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 install -U spacy
)
另一种方法:
pip install -U pip setuptools wheel
pip install -U spacy
python -m spacy download en_core_web_sm
也失败了。
请帮帮我。
【问题讨论】:
尝试在 Windows 中从 cmd 执行“pip install spacy”,它对我有用 【参考方案1】:确保您已配置代理 与:
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
【讨论】:
代理地址、端口、身份验证应该输入什么? @ringola27 :如果您在其他情况下不使用代理,则不需要执行此命令,但是您的浏览器是否在开始时告诉您一些事情(关于代理)? 我的浏览器没有说明代理。 你使用的是哪个版本的 pip ?可以在cmd中使用pip -V
查看。以上是关于无法通过 pip 安装 Spacy [重复]的主要内容,如果未能解决你的问题,请参考以下文章
AWS Lambda -- 无法为 SpaCy 导入 srsly.ujson.ujson