Generating Sphinx PDF on MacOS X

Posted:   |  More posts about sphinx rst latex pdflatex pdf

Latex distribution is known to be very big on any platform. The MacTex package is 2.5GB download. Fortunately there's a minimal package, BasicTex which is around 100MB. That's perfect and seem to include all needed for Sphinx to generate the pdf.

But after running make latexpdf in my Sphinx doc, got errors about missing sty.

! LaTeX Error: File `wrapfig.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Searching around, lot of solutions mention about install texlive-late-extra package (on Debian/Ubuntu). Until I found that TexLive also has a packages manager called tlmgr. First attempt of running tlmgr complain about itself require an update:-

sudo tlmgr update --self

After that I need to install the following packages:-

sudo tlmgr install titlesec framed threeparttable wrapfig multirow collection-fontsrecommended

And Sphinx successfully generated the PDF.

Comments powered by Disqus

About me

Web developer in Malaysia. Currently work at MARIMORE Inc building internet services using Python and Django web framework.

ImportError is an error message emitted by Python when it failed to load certain module as requested by programmer. It's a very common error when someone new to the language trying it out. This website on the same theme, will try provide help for newcomers on any technologies to overcome their first hurdle.

Try most of the examples you may find here on Digital Ocean cloud service. They provide excellent VPS at a very cheaper price. Using this referral link you'll get USD10 credits upon sign up. That's enough to run single VPS with 1GB RAM for a month.


I can also be found at the following sites:-



The postings on this site are my own and don't necessarily represent my employer's positions, strategies or opinions.