Skip to content

MacOS编译错误:Package minted Error: You must have `pygmentize' installed to use this package #26

Closed Answered by RizhongLin
Wizard23333 asked this question in Q&A
Discussion options

You must be logged in to vote

你好,

谢谢你能够提出这个 issue,让我们了解到文档中缺少了 pygmentize 的相关说明。

但我认为这并不是一个常见的问题,因为我和 @skyleaworlder 在我们的 Macbook 上都没有遇到过这个问题,编译都非常顺利。问题可能出在你没有将 Python 或 pygmentize 的路径加入环境变量 PATH 中,导致与 minted 相关的部分无法编译。

你所提到的解决方法:

I just encountered the same issue and copying pygmentize from /Library/Frameworks/Python.framework/Versions/2.6/bin/pygmentize to /usr/local/bin resolved the problem for me.

其实也是把 pygmentize 的安装路径移到了已经包括在环境变量的路径中(/usr/local/bin 默认是包括在环境变量中的!),这样系统才能找到并正确使用 pygmentize,从而解决了问题。

我们已经在 README.md 中更新了关于安装 Python 和 pygmentize 相关步骤的说明。

@skyleaworlder 之前回复你时也已经提到了这个问题:

I think I understand what you mean, but personally I don't think this is a bug.

The minted package does indirectly use pygmentize,…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Wizard23333
Comment options

@RizhongLin
Comment options

Answer selected by RizhongLin
@skyleaworlder
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
type/bug Something isn't working type/docs Improvements or additions to documentation
3 participants
Converted from issue

This discussion was converted from issue #24 on April 24, 2023 13:05.