【问题标题】:How can I install a python package to google Colab from a private Pypi repository?如何从私有 Pypi 存储库将 python 包安装到谷歌 Colab?
【发布时间】:2020-02-04 15:20:12
【问题描述】:

我的公司开发了 python 包并将它们托管在私有 Pypi 存储库中。我希望在 Google Colab 笔记本上安装这些包。

如果它们位于公共 Pypi 存储库中,这将起作用:

!pip3 install --index-url=https://pypi.spotify.net/spotify/production confidence

但是,它会导致此错误:

Looking in indexes: https://pypi.spotify.net/spotify/production
Collecting confidence
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e601748>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e601588>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e6015f8>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e601390>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e6012e8>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
  ERROR: Could not find a version that satisfies the requirement confidence (from versions: none)
ERROR: No matching distribution found for confidence

我怀疑这是因为 google Colab 是托管笔记本。这意味着它不是通过我的工作 wifi 连接到 Pypi,而是从谷歌服务器。

【问题讨论】:

标签: python google-cloud-platform jupyter google-colaboratory pypi


【解决方案1】:

您需要:

【讨论】:

    猜你喜欢
    • 2016-11-15
    • 2023-01-26
    • 2021-04-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-01
    • 2019-12-11
    相关资源
    最近更新 更多