python - 在内部 pypi 索引上找不到包
问题描述
我有一个mypackage
托管在内部 pypi 存储库上的私有包。当我尝试安装它时,我得到
$ pip install mypackage
Looking in indexes: https://pypi.org/simple, https://internal.com/repository/pipy-internal/
ERROR: Could not find a version that satisfies the requirement mypackage (from versions: none)
ERROR: No matching distribution found for mypackage
我可以在内部连接上看到包。这是文件夹结构
| internal.com/repository/pipy-internal/
| -- mypackage
| ---- 0.1.0
| ------- mypackage-0.1.0-py3-none-any.whl
这是我的~/.config/pip/pip.conf
(我在 ubuntu 18.04 上)
[global]
extra-index-url = https://internal.com/repository/pipy-internal/
trusted-host = pypi.org
internal.com
内部仓库需要我存储的登录凭据~/.netrc
machine internal.com
login myuser
password mypassword
安装其他 python 包(来自 pypi.org)工作正常。
编辑
当我运行pip install
with时,--verbose
我看到 pip 需要直接在目录下的文件internal.com/repository/pipy-internal/mypackage/
(可能是.whl
文件)。但就我而言,还有一个额外的版本文件夹 ( 0.1.0
)。这个文件夹结构是由 twine 创建的
twine upload -r nexus --config-file $HOME/.pypirc dist/*.whl
Uploading distributions to https://internal.com/repository/pipy-internal/
Uploading mypackage-0.1.0-py3-none-any.whl
100%|██████████| 4.05k/4.05k [00:00<00:00, 12.2kB/s]
解决方案
推荐阅读
- ruby-on-rails - 如何使用 curl 命令设置布尔值来填充数据库,Rails
- sapscript - 在 Form Painter ABAP 中显示 VBDKR-WAERK 的值时出错
- ansible - 使用 ansible playbook 按所有者搜索
- javascript - 对于像 (25) 这样带有角度百分比管道的数字,限制为 2 位小数
- r - 使用 tidync 只读取变量的子集
- oracle - 如何找到最近的定位点?
- fmt - 在 Windows 32 上使用 Intel C 编译 fmt
- google-apps-script - 如何在 Google Apps 脚本中停止 foreach 循环
- navigation - Orocommerce Akeneo 在导航栏中显示类别
- python - 熊猫如何检查一列的子字符串是否是另一列的子字符串