Why doesn't import work?

alex23 wuwei23 at gmail.com
Wed Aug 6 10:56:22 CEST 2008

On Aug 5, 8:34 am, ssecorp <circularf... at gmail.com> wrote:
> I have in Lib/site-packages a module named pdfminer. when I do import
> pdfminer it complains:
> so I apparently can't import a directory pdfminer. In the directory
> pdfminer there are 3 other directoriees and inside them python-files.

Are the 3 directories called pdflib, samples & tools?

> how would I import them?

The simple answer is: you -shouldn't- be.

PDFMiner is a set of tools -to be used from the command line- rather
than a PDF-handling library. You're not meant to unpack PDFMiner into
site-packages, instead you should unpack it to a temporary location
and run make. Please read the documentation on the PDFMiner site, it's
pretty clear that it's a suite of tools.

If you're after a library for dealing programmatically with PDF files,
try pyPDF:

More information about the Python-list mailing list