使用 Nexus 安装 conda 频道包

使用 Nexus 安装 conda 频道包

我在通过 Sonatype Nexus Repository Manager (版本:PRO 3.16.1-02) 安装 conda 频道包时遇到问题。例如以下代码

conda install pytorch::pytorch==1.1.0 
#is equivalent to:
#conda install --channel pytorch pytorch==1.1.0 

在控制台上打印以下错误消息:

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/pytorch/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.
ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /pytorch/linux-64/current_repodata.json (Caused by ConnectTimeoutError
(<urllib3.connection.VerifiedHTTPSConnection object at 0x7feb2d7f3c50>, 'Connection to conda.anaconda.org timed out. (connect timeout=9.15)'))",),)

我认为问题是当我指定 conda 使用的 conda 通道时https://conda.anaconda.org/pytorch/linux-64/current_repodata.json而不是 Nexus URL(这不起作用,因为我使用代理,Nexus 应该帮我下载)。我的问题是如何让 conda 使用 Nexus URL 或以某种方式确保 Nexus 可以从 conda 频道下载 python 包?

亲切的问候

迈克尔

相关内容