V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
3dwelcome
V2EX  ›  问与答

怎么用优雅的方式,让程序自动下载 github 上的依赖包?

  •  
  •   3dwelcome · Jun 15, 2021 · 2048 views
    This topic created in 1789 days ago, the information mentioned may be changed or developed.

    比如有一句 py 代码 requests.get(url),要下载 https://github.com/cuda/archive/16.zip 上的最新依赖包,直连就会卡住。

    除了修改 py 源代码,还有其他办法来下载 github.com 上的 zip 吗?

    5 replies    2021-06-15 08:21:24 +08:00
    lostberryzz
        1
    lostberryzz  
       Jun 15, 2021
    自建 gh-proxy
    3dwelcome
        2
    3dwelcome  
    OP
       Jun 15, 2021
    @lostberryzz 好麻烦,我现在是先把 github 文件下载到本地后,自己建个本地 web 服务器,把 github.com 重定向到 127.0.0.1

    老外又特别喜欢直连 github.comraw.github.com 下一些依赖包,头大。
    Rheinmetal
        3
    Rheinmetal  
       Jun 15, 2021
    境外 vps 上搭建环境 ssh 过去开发?
    QingStone
        4
    QingStone  
       Jun 15, 2021 via iPhone   ❤️ 1
    把代理挂在到终端,或者全局
    Volekingsg
        5
    Volekingsg  
       Jun 15, 2021 via iPhone   ❤️ 1
    @3dwelcome 那你不如看看这两个 https://github.com.cnpmjs.org/https://gitclone.com/ 当然走代理才是最一劳永逸的方法
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5064 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 03:56 · PVG 11:56 · LAX 20:56 · JFK 23:56
    ♥ Do have faith in what you're doing.