pdfminer - import error

一世执手 提交于 2019-12-07 16:55:51

问题


I’m new to Python and programming in general.

I am trying to install pdfMiner. I have Windows 7 with Python 2.7 installed. I followed the instructions when installing (downloaded the PDFMiner source, unpacked it, and ran setup.py to install and it was installed in C:\pdfminer) – no errors.

It created: build, build\lib,build\lib\pdfminer, then copied files to build\lib\pdfminer. It created build\scripts-2.7 and copied tools\pdf2txt.py, dymppdf.py to scripts, then wrote install-egg-info and had no errors with install.

When I try running the test document from the command line:

C:\pdfminer\pdfminer-20140328> pdf2txt.py samples/simple1.pdf

I get:

File “C:\Python27\Scripts\pdf2txt.py”, line3, in <module> from pdfminer.pdfdocument import PDFDocument
ImportError:  No module named pdfminer.pdfdocument

I saw this post:

pdfminer - ImportError: No module named pdfminer.pdfdocument

and tried following it (#1..put sys.path.append… into pdf2txt.py) and get the same error.

The system variables do include the path (pdfminer\pdfminer-20140328).

I’ve looked for other solutions but haven’t had much luck – the file is there but I can’t seem to get the program to look in the right area for it…I think.

Do I have the wrong path or is it installed in the wrong directory?

来源:https://stackoverflow.com/questions/36783099/pdfminer-import-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!