无法安装特定的 pypi 包 JFrog 工件,同时已存在于远程 cate 存储库中

问题描述 投票:0回答:1

我想通过此命令安装特定的 pypi 包(

cryptography
包):

pip install -i http://JFROG_URL/artifactory/api/pypi/all-pypi/simple --trusted-host JFROG_URL cryptography

但我收到此错误:

ERROR: HTTP error 403 while getting http://JFROG_URL/artifactory/api/pypi/all-pypi/packages/packages/25/1d/f86ce362aedc580c3f90c0d74fa097289e3af9ba52b8d5a37369c186b0f1/cryptography-41.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl#sha256=e40211b4923ba5a6dc9769eab704bdb3fbb58d56c5b336d30996c24fcf12aadb (from http://JFROG_URL/artifactory/api/pypi/all-pypi/simple/cryptography/) (requires-python:>=3.7)

ERROR: Could not install requirement cryptography from http://JFROG_URL/artifactory/api/pypi/all-pypi/packages/packages/25/1d/f86ce362aedc580c3f90c0d74fa097289e3af9ba52b8d5a37369c186b0f1/cryptography-41.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl#sha256=e40211b4923ba5a6dc9769eab704bdb3fbb58d56c5b336d30996c24fcf12aadb because of error 403 Client Error: Forbidden for url: http://JFROG_URL/artifactory/api/pypi/all-pypi/packages/packages/25/1d/f86ce362aedc580c3f90c0d74fa097289e3af9ba52b8d5a37369c186b0f1/cryptography-41.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

虽然这个包已经存在于我们的缓存远程存储库中。例如,我可以下载此 WHL 文件并手动安装此软件包,但我想从 jfrog 安装此软件包。

有人对这个问题有想法。

artifactory pypi
1个回答
0
投票

您可以将

--user
标志与
pip install
命令一起使用,因为它会将软件包安装到您的用户目录中,并可能绕过与系统范围安装相关的任何权限问题

pip install -i http://JFROG_URL/artifactory/api/pypi/all-pypi/simple --trusted-host JFROG_URL --user cryptography

您还可以从 JFROG 缓存远程存储库手动下载软件包并使用

pip install
安装它,如下所示:

# replace `/path/to/` with the actual path to the downloaded package file!!!
pip install /path/to/cryptography-41.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
© www.soinside.com 2019 - 2024. All rights reserved.