You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:执行pip install pylinac时PyPI连接超时且无匹配发行版

解决pylinac安装超时失败问题

操作场景:打开Anaconda Prompt执行pip install pylinac,出现连接超时错误:

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 0x000002F148845F60>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pylinac/
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 0x000002F148846230>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pylinac/
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 0x000002F148846530>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pylinac/
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 0x000002F148846620>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pylinac/
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 0x000002F1488467A0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pylinac/
ERROR: Could not find a version that satisfies the requirement pylinac (from versions: none)
ERROR: No matching distribution found for pylinac
WARNING: There was an error checking the latest version of pip.

以下是可行的解决方法:

  • 使用国内PyPI镜像源安装
    国内镜像源访问速度更快,避免超时。执行以下任意一条命令:

    # 清华镜像
    pip install pylinac -i https://pypi.tuna.tsinghua.edu.cn/simple --timeout=60
    # 阿里镜像
    pip install pylinac -i https://mirrors.aliyun.com/pypi/simple/ --timeout=60
    # 豆瓣镜像
    pip install pylinac -i https://pypi.douban.com/simple/ --timeout=60
    

    --timeout=60 是将超时时间延长到60秒,避免因网络波动导致失败。

  • 通过conda安装
    既然使用Anaconda,直接用conda安装更适配,执行:

    conda install -c conda-forge pylinac
    
  • 调整网络环境

    • 关闭当前代理软件(如果开启),部分代理会阻断PyPI连接
    • 切换到稳定网络(如手机热点),排除本地网络故障
  • 手动下载安装包本地安装

    1. 下载对应系统和Python版本的pylinac安装包(.whl或.tar.gz格式)
    2. 打开Anaconda Prompt进入下载目录,执行:
    pip install 你的安装包文件名.whl
    

内容的提问来源于stack exchange,提问作者ruipe90

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 09:52:43