“无法找到安装候选”在诗歌中尝试安装 `genicam` - 如何调试?

发布于 2025-01-20 04:02:22 字数 1145 浏览 1 评论 0原文

我刚刚使用新的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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

那一片橙海, 2025-01-27 04:02:22

依赖于使用已过期的身份验证令牌的存储库。更新身份验证凭据修复了此问题。

Had a dependency to a repository using an authentication token which were expired. Updating auth credentials fixed this.

〃温暖了心ぐ 2025-01-27 04:02:22

类似于 Jakob Kristensen 的答案(感谢您的指点),在我的情况下,访问令牌已过期。这是关于我如何解决它的更长的答案。


所需存储库的访问令牌已过期:

Poetry 将身份验证方法保存在 poetry.toml 文件中:

  • 使用 poetry config http-basic.$SOURCENAME $USERNAME $PASSWORD 命令更新访问令牌。
    • 注意:这里的 $SOURCENAME 指的是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:

  • Update the access tokens with the poetry config http-basic.$SOURCENAME $USERNAME $PASSWORD command.
    • Note: here $SOURCENAME refers to how the source was named in the pyproject.toml file and not to the name of the repository!
  • See the poetry documentation
    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}".

微凉 2025-01-27 04:02:22

从 ~/.config/pypoetry/auth.toml 中删除条目 [http-basic.artifactory] ​​解决了我的问题。

Removing the entry [http-basic.artifactory] from ~/.config/pypoetry/auth.toml fixed the issue for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文