【发布时间】: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