1

I'm try to use the minted package in latex to display code in latex document. I get an error message "you must have pygmentize installed" to use this package. So I tried to install the package Pygments with brew

I typed the following line brew install Pygments but get the following message

==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

By the way, the if I type pip3 install pygments I get Requirement already satisfied: pygments in /usr/local/lib/python3.7/site-packages (2.3.1) which means that pip3 has installed on the machine but homebrew doesn't know where it is

What am I doing wrong?

  • The error message says pygmentize why are you trying pygments? – user151019 Apr 22 at 11:13
  • thank you @Mark for your comment: because I found that the package pygmentize is part of. – ecjb Apr 22 at 13:11
  • Seems the Pygments package is not part of brew distribution, only a Python package to be installed with pip. Just be sure the execution path declared contains also the pygments path (as python path) – Yoan Apr 22 at 14:44
  • thank you for your comment @Yoan. This is indeed a question I have been facing many times but recurrently have trouble overcoming: so after typing pip3 show Pygments I get the path where that package is installed namely: /usr/local/lib/python3.7/site-packages. Moreover, when I launch python from the Terminal and type import pygments no error message is displayed. That means that it is correctly installed but that the latex editor cannot find it. Do you have an idea how to fix the problem? – ecjb Apr 22 at 15:02
  • Use the command which python for path finding, Then in your init file add the following: (setenv "PATH" (concat "/Users/yoan/anaconda3/bin:" (getenv "PATH"))) (add-to-list 'exec-path "/Users/yoan/anaconda3/bin"). The path should end in a /bin folder, above is mine. – Yoan Apr 22 at 15:10

You must log in to answer this question.

Browse other questions tagged .