难以通过amazonsagemaker安装python包



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

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

%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.

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

UPD:

也按照亚马逊书中的推荐进行了尝试:

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

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

两者都不起作用,出现了和上面相同的错误。

我得到了相同的错误:

CondaHTTPError:url 的HTTP 000连接失败

这是因为笔记本无法连接到互联网。我在一个私有专有网络中创建了这个笔记本。我用";直接互联网接入";已启用。然后我就可以安装软件包了。

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

最新更新