收到“生成包元数据时出错”安装 TkFontAwesome 时

发布于 2025-01-11 15:04:25 字数 2265 浏览 0 评论 0原文

我正在尝试使用 python -m pip install tkfontawesome 安装 TkFontAwesome ,但总是得到以下信息错误:

Collecting tkfontawesome
  Using cached tkfontawesome-0.2.0-py3-none-any.whl (405 kB)
Collecting tksvg==0.7.4
  Using cached tksvg-0.7.4.tar.gz (50 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      Installing dependency cmake... Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\myuser\AppData\Local\Temp\pip-install-2krbeh5s\tksvg_7491a69795da43779e9e71e527849349\setup.py", line 62, in <module>
          sp.call(["pacman", "--needed", "--noconfirm", "-S", "mingw-w64-x86_64-{}".format(dep)])  # , stdout=sp.PIPE)
        File "C:\Users\myuser\AppData\Local\Programs\Thonny\lib\subprocess.py", line 339, in call
          with Popen(*popenargs, **kwargs) as p:
        File "C:\Users\myuser\AppData\Local\Programs\Thonny\lib\subprocess.py", line 800, in __init__
          restore_signals, start_new_session)
        File "C:\Users\myuser\AppData\Local\Programs\Thonny\lib\subprocess.py", line 1207, in _execute_child
          startupinfo)
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

以前使用 pip 安装软件包从未遇到过任何问题。如果这个 WinError 2 意味着这个,则文件 subprocess.py 位于 \Thonny\lib\ 中。

我正在使用:

  • Python 3.7.7
  • pip 22.0.3
  • Tk 8.6.9
  • Thonny 3.2.7
  • Windows 10

到目前为止我已经尝试:

  • 更新我的 pip 和 setuptools (它们已经是最新的)
  • 来安装 TkFontAwesome使用 ez_setup
  • 使用 --use-deprecated=backtrack-on-build-failures 安装 TkFontAwesome

否 使用。有人知道下一步该做什么吗?提前致谢。

I'm trying to install TkFontAwesome using python -m pip install tkfontawesome, but always get the following error:

Collecting tkfontawesome
  Using cached tkfontawesome-0.2.0-py3-none-any.whl (405 kB)
Collecting tksvg==0.7.4
  Using cached tksvg-0.7.4.tar.gz (50 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      Installing dependency cmake... Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\myuser\AppData\Local\Temp\pip-install-2krbeh5s\tksvg_7491a69795da43779e9e71e527849349\setup.py", line 62, in <module>
          sp.call(["pacman", "--needed", "--noconfirm", "-S", "mingw-w64-x86_64-{}".format(dep)])  # , stdout=sp.PIPE)
        File "C:\Users\myuser\AppData\Local\Programs\Thonny\lib\subprocess.py", line 339, in call
          with Popen(*popenargs, **kwargs) as p:
        File "C:\Users\myuser\AppData\Local\Programs\Thonny\lib\subprocess.py", line 800, in __init__
          restore_signals, start_new_session)
        File "C:\Users\myuser\AppData\Local\Programs\Thonny\lib\subprocess.py", line 1207, in _execute_child
          startupinfo)
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Never had any problems installing packages using pip before. The file subprocess.py IS in \Thonny\lib\ if this WinError 2 means that.

I'm using:

  • Python 3.7.7
  • pip 22.0.3
  • Tk 8.6.9
  • Thonny 3.2.7
  • Windows 10

So far i've tried:

  • to update my pip and setuptools (they're already up-to-date)
  • to install TkFontAwesome using ez_setup
  • to install TkFontAwesome using --use-deprecated=backtrack-on-build-failures

No use. Anyone have any ideas what to do next? Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

平生欢 2025-01-18 15:04:25

尝试在 pip3 安装包之后添加此内容:

    --use-deprecated=backtrack-on-build-failures

例如,如果您想要:

    pip3 install imageAI

则:

    pip3 install imageAI --use-deprecated=backtrack-on-build-failures

那里

Try add this after your pip3 install package:

    --use-deprecated=backtrack-on-build-failures

eg, if you want:

    pip3 install imageAI

then:

    pip3 install imageAI --use-deprecated=backtrack-on-build-failures

copy from there.

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