Open quark67 opened 3 months ago
I read in the development status of minted that minted 3.0 will not rely on Pygments, ...
In my understanding, minted 3.0 will provide an executable which wraps pygmentize
and is compatible with restricted shell escape, so the minted 3.0 still relies on Pygments.
On Mac plateform, Python is often installed with the Homebrew package manager (https://en.wikipedia.org/wiki/Homebrew_(package_manager)). But Homebrew is also used on Linux world and the change is not only on HomeBrew.
The change is PEP 668 (https://peps.python.org/pep-0668/).
It was recently implemented in Homebrew, with Python 3.12 (see the very interesting discussion https://github.com/orgs/Homebrew/discussions/3404, titled Python: Mark Homebrew Python as externally managed).
The change is dated from February 21, 2024 (https://github.com/orgs/Homebrew/discussions/3404#discussioncomment-8549228):
The change is this:
pip3 install Pygments
doesn't work anymore.Here is the output:
Luckily, Pygments is available in Homebrew formulas: https://formulae.brew.sh/formula/pygments#default (but on Mac only for the last 3 majors macOS versions).
So,
pip3 install Pygments
can be replaced withbrew install pygments
(for users for whichpip3 install
doesn't work anymore). Other solution, add--break-system-packages
at the end of the command (so usepip3 install Pygments --break-system-packages
), see the note at the end of the error message. Also see https://www.youtube.com/watch?v=sFS6rIZN4Lg (problem not only on the Mac).As on https://github.com/orgs/Homebrew/discussions/3404 some users disagree with the change, perhaps there will be a change which allow further use of
pip3 install
command without having to use a virtual environment.I read in the development status of minted that minted 3.0 will not rely on Pygments, but this change with PEP 668 needs to be documented in the final version of minted 2.x, I think.