Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从私有Pypi存储库将python包安装到google Colab?_Python_Google Cloud Platform_Jupyter_Google Colaboratory_Pypi - Fatal编程技术网

如何从私有Pypi存储库将python包安装到google Colab?

如何从私有Pypi存储库将python包安装到google Colab?,python,google-cloud-platform,jupyter,google-colaboratory,pypi,Python,Google Cloud Platform,Jupyter,Google Colaboratory,Pypi,我的公司已经开发了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 Col

我的公司已经开发了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
查找索引:https://pypi.spotify.net/spotify/production
收集信心
警告:连接被“ConnectTimeoutError(,“连接到pypi.spotify.net超时。(连接超时=15)”:spotify/production/Conference中断后,正在重试(重试(总计=4,连接=None,读取=None,重定向=None,状态=None))/
警告:连接被“ConnectTimeoutError(,“连接到pypi.spotify.net超时。(连接超时=15)”:spotify/production/Conference断开后重试(重试(总计=3,连接=None,读取=None,重定向=None,状态=None))/
警告:连接被“ConnectTimeoutError(,“连接到pypi.spotify.net超时。(连接超时=15)”:spotify/production/Conference中断后,正在重试(重试(总计=2,连接=None,读取=None,重定向=None,状态=None))/
警告:连接被“ConnectTimeoutError(,“连接到pypi.spotify.net超时。(连接超时=15)”:spotify/production/Conference中断后,正在重试(重试(总计=1,连接=None,读取=None,重定向=None,状态=None))/
警告:连接被“ConnectTimeoutError(,“连接到pypi.spotify.net超时。(连接超时=15)”:spotify/production/Conference断开后重试(重试(总计=0,连接=None,读取=None,重定向=None,状态=None))/
错误:找不到满足需求信心的版本(来自版本:无)
错误:找不到与置信度匹配的分布
我怀疑这是因为GoogleColab是一个托管笔记本。这意味着它不是通过我的工作wifi连接到Pypi,而是通过谷歌服务器连接到Pypi。

您需要:

  • 使包存储库可用于公共internet(不太可能您真的想要这样做)
  • 将Colaboratory连接到本地运行时:

这感觉很有意义:回购是否有可能是在代理背后?如果是这样,您如何在托管笔记本的系统中设置代理设置?