You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

调用abjad.show()触发FileNotFoundError: [WinError 2]系统找不到指定文件的问题求助

调用abjad.show()触发FileNotFoundError: [WinError 2]系统找不到指定文件的问题求助

我从abjad官方文档里找了一段最基础的示例代码:

import abjad
n = abjad.Note("c'4")
abjad.show(n)

运行这段代码后,我得到了完整的报错回溯信息:

Traceback (most recent call last):
  File "R:\W\y.py", line 122, in <module>
    abjad.show(n)
  File "R:\W\venv\Lib\site-packages\abjad\io.py", line 672, in show
    result = illustrator()
             ^^^^^^^^^^^^^
  File "R:\W\venv\Lib\site-packages\abjad\io.py", line 75, in __call__
    string = self.string or self.get_string()
                            ^^^^^^^^^^^^^^^^^
  File "R:\W\venv\Lib\site-packages\abjad\io.py", line 152, in get_string
    return lilypond_file._get_lilypond_format()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "R:\W\venv\Lib\site-packages\abjad\lilypondfile.py", line 474, in _get_lilypond_format
    string = configuration.get_lilypond_version_string()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "R:\W\venv\Lib\site-packages\abjad\configuration.py", line 388, in get_lilypond_version_string
    proc = subprocess.run(command, stdout=subprocess.PIPE)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\Python3.12\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\Python3.12\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "G:\Python3.12\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

我自己调试了subprocess.py,发现里面的executable参数是None,但完全搞不懂它应该指向哪个可执行文件。

再说说我的环境:我在虚拟环境中安装的abjad,分别试过Python 3.10和Python 3.12版本,abjad也测试了3.19和3.21两个版本,结果都是一模一样的错误。我平时装过好几百个Python包,这种情况还是第一次碰到,实在摸不着头脑。

有没有大佬能帮我分析下这问题出在哪?

备注:内容来源于stack exchange,提问作者Apostolos

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.14 08:54:34