gpt4 book ai didi

python - 使用 python install 命令出现超时消息

转载 作者:太空宇宙 更新时间:2023-11-03 14:04:17 25 4
gpt4 key购买 nike

我正在尝试安装 spacy 'en_core_web_md' 模型,但每次我尝试使用此 python 命令下载它时都会收到超时消息:'python -m spacy 下载 en_core_web_md'

错误信息:

  File "C:\ProgramData\Anaconda2\envs\tensorflow\lib\site-packages\pip\_vendor\r
equests\packages\urllib3\response.py", line 237, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnecti
onPool(host='github-production-release-asset-2e65be.s3.amazonaws.com', port=443)
: Read timed out.

最佳答案

en_core_web_md 模型为 115 MB,因此根据您的互联网连接(以及托管模型的 GitHub 服务器),连接超时和下载失败的情况始终可能发生。

您还可以通过浏览器或任何其他您方便的方式下载模型。您可以在单独的 model releases 中找到 .tar.gz 存档。 (只需 pip 击您要下载的型号上的“发布详细信息”按钮即可)。例如,here's the en_core_web_md release .

模型是 Python 包,因此下载文件后,您可以简单地通过 pip 安装它:

pip install /path/to/en_core_web_md-2.0.0.tar.gz

然后您可以像这样加载它:

nlp = spacy.load('en_core_web_md')

关于python - 使用 python install 命令出现超时消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49019784/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com