繁体   English   中英

努力通过 amazon sagemaker 安装 python package

[英]struggling to install python package via amazon sagemaker

我正在使用 Amazon Sagemaker 并尝试通过 anaconda python3 笔记本安装 gaapi4py package。

到目前为止,我已经尝试了以下命令:

%conda install gaapi4py

conda install gaapi4py

Got same error:

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda-forge/linux-64/current_repodata.json>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https://conda.anaconda.org/conda-forge/linux-64'



Note: you may need to restart the kernel to use updated packages.

或者我尝试了以下但它也失败了:

pip install gaapi4py

错误文本:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f657c803c50>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/gaapi4py/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f657c8035f8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/gaapi4py/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f657c803550>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/gaapi4py/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f657c803400>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/gaapi4py/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f657c803358>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/gaapi4py/
ERROR: Could not find a version that satisfies the requirement gaapi4py (from versions: none)
ERROR: No matching distribution found for gaapi4py
WARNING: You are using pip version 20.0.2; however, version 20.3 is available.
You should consider upgrading via the '/home/ec2-user/anaconda3/envs/python3/bin/python -m pip install --upgrade pip' command.
Note: you may need to restart the kernel to use updated packages.

我究竟做错了什么? 以前的所有软件包都运行良好。

更新:

也按照亚马逊书中的建议尝试过:

import sys
!{sys.executable} -m pip install gaapi4py

import sys
!conda install -y --prefix {sys.prefix} gaapi4py

两者都不起作用,出现与上述相同的错误。

我遇到了同样的错误:

CondaHTTPError:HTTP 000 url 连接失败

这是因为笔记本无法连接到 inte.net。 我在私有 VPC 中创建了笔记本。 我创建了一个启用了“Direct inte.net access”的新笔记本。 然后我就可以安装软件包了。

在与我们的 IT 部门反复交谈后,我发现出于安全原因,自定义库安装被阻止了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM