“无法找到安装候选”在诗歌中尝试安装 `genicam` - 如何调试?
我刚刚使用新的install-poetry.py
脚本在Windows 10计算机上安装了诗歌。我刚刚将我的Python应用程序依赖性管理转换为pyproject.toml
poetry 。它适用于我的大多数依赖性,但对于 genicam 软件包,上面的无法查找安装候选
错误消息。使用pip
安装该软件包确实有效。我如何调试此类问题?我尝试运行诗歌安装-VVV
,但我所得到的只是诗歌内部的诗歌堆栈 - 详细形式,没有任何有用的添加到短形式的输出中(尤其没有索引或URL它尝试并失败了):
Package operations: 1 install, 0 updates, 0 removals
• Installing genicam (1.1.0)
RuntimeError
Unable to find installation candidates for genicam (1.1.0)
at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\installation\chooser.py:72 in choose_for
68│
69│ links.append(link)
70│
71│ if not links:
→ 72│ raise RuntimeError(
73│ "Unable to find installation candidates for {}".format(package)
74│ )
75│
76│ # Get the best link
我正在使用Python 3.8.10上的诗歌版本1.1.13(python 3.8是genicam
> genicam - 这是由Genicam Consortium管理的封闭源软件包,他们有一个荒谬的释放过程;
I have just installed poetry on a windows 10 machine using the new install-poetry.py
script. I have just converted my python application dependency management to pyproject.toml
with poetry
. It works for most of my dependencies, but fails for the genicam package, with the above Unable to find installation candidates
error message. Installing that package with pip
does work. How do I debug such issues? I tried running poetry install -vvv
, but all I get is the same stack-trace of poetry's internals in verbose form, nothing useful added to the output of the short-form (in particular no indexes or urls it tried and failed):
Package operations: 1 install, 0 updates, 0 removals
• Installing genicam (1.1.0)
RuntimeError
Unable to find installation candidates for genicam (1.1.0)
at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\installation\chooser.py:72 in choose_for
68│
69│ links.append(link)
70│
71│ if not links:
→ 72│ raise RuntimeError(
73│ "Unable to find installation candidates for {}".format(package)
74│ )
75│
76│ # Get the best link
I'm using poetry version 1.1.13 on python 3.8.10 on windows 10 (python 3.8 is the latest supported by genicam
- it's a closed source package managed by the GenICam consortium, and they have a ridiculous release process; somehow they need a committee voting before they can release a new package - end rant).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
依赖于使用已过期的身份验证令牌的存储库。更新身份验证凭据修复了此问题。
Had a dependency to a repository using an authentication token which were expired. Updating auth credentials fixed this.
类似于 Jakob Kristensen 的答案(感谢您的指点),在我的情况下,访问令牌已过期。这是关于我如何解决它的更长的答案。
所需存储库的访问令牌已过期:
Poetry 将身份验证方法保存在
poetry.toml
文件中:poetry config http-basic.$SOURCENAME $USERNAME $PASSWORD
命令更新访问令牌。pyproject.toml
文件中源的命名方式,不是存储库的名称!有关更多信息,请参阅配置凭据。
如果问题发生在 Gitlab-CI 中,您可以使用
poetry config http-basic.$SOURCENAME gitlab-ci-token "${CI_JOB_TOKEN}"
。Similar to Jakob Kristensen's answer (thanks for the pointer), in my case the access tokens had expired. Here's a longer winded answer on how I solved it.
The Access Tokens to the desired repositories had expired:
Poetry saves the authentication method in the
poetry.toml
file:poetry config http-basic.$SOURCENAME $USERNAME $PASSWORD
command.pyproject.toml
file and not to the name of the repository!on Configuring Credentials for more information.
If the issue is occurring in Gitlab-CI, you may use
poetry config http-basic.$SOURCENAME gitlab-ci-token "${CI_JOB_TOKEN}"
.从 ~/.config/pypoetry/auth.toml 中删除条目 [http-basic.artifactory] 解决了我的问题。
Removing the entry [http-basic.artifactory] from ~/.config/pypoetry/auth.toml fixed the issue for me.