N Coffman
N Coffman

Reputation: 11

Trouble Installing Poppler on MacOS using Homebrew

Searching for a means to extract annotations from PDFs led me to several posts using python and poppler.
Extracting PDF annotations/comments
Parse annotations from a pdf

However, despite encouragement that homebrew would be the answer:
Install Poppler for Python on Mac see comment

I am running into similar problems as described here:
https://github.com/Homebrew/homebrew-core/issues/12895

I have also tried using pip to install pypoppler, but have been unable, despite use of sudo and sudo -H.
(Error prompt describes issues with pycairo. Very uninterested in chasing down dependencies)

$ python script.py
Traceback (most recent call last):
  File "pdf_annotations.py", line 1, in <module>
import poppler
ImportError: No module named poppler

$ brew search popp
==> Formulae
poppler ✔

$ which python
/usr/local/bin/python
$ which pip
/usr/local/bin/pip

$ python --version
Python 2.7.15
$ pip --version
pip 18.0 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)

Upvotes: 1

Views: 3695

Answers (1)

Octa
Octa

Reputation: 11

brew install poppler

Works ok with Mojave. Also, I'd recommend using python 3.

Upvotes: 1

Related Questions