我试图安装pdfMiner与CollectiveAccess工作。我的主机(pair.com)给了我下面的信息,在这一过程中,以帮助:pdfminer - 导入错误:没有模块名为pdfminer.pdfdocument
When compiling, it will likely be necessary to instruct the
installation to use your account space above, and not try to install
into the operating system directories. Typically, using "--
home=/usr/home/username/pdfminer" at the end of the install command should allow for that.
我试图安装时,遵循了这一指令。 结果是:
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
changing mode of /usr/home/username/pdfminer/bin/latin2ascii.py to 755
changing mode of /usr/home/username/pdfminer/bin/pdf2txt.py to 755
changing mode of /usr/home/username/pdfminer/bin/dumppdf.py to 755
running install_egg_info
Removing /usr/home/username/pdfminer/lib/python/pdfminer-20140328.egg-info
Writing /usr/home/username/pdfminer/lib/python/pdfminer-20140328.egg-info
我看不出有什么不对的(我很新的蟒蛇),但是当我尝试运行示例命令$ pdf2txt.py samples/simple1.pdf
我得到这个错误:
Traceback (most recent call last): File "pdf2txt.py", line 3, in <module>
from pdfminer.pdfdocument import PDFDocument ImportError: No module named pdfminer.pdfdocument
我跑蟒蛇2.7.3。我无法从根目录安装(共享主机)。最新版本的pdfminer,2014/03/28。 我在类似的问题上看到过一些文章(“no module named ...”,但没有完全一样的东西,所提出的解决方案要么没有帮助(比如用sudo安装 - 不是选项;指定python的路径这似乎并不成为问题)等)。
或者这是我的主人一个问题吗?(即东西不对劲或他们设置不同)
选项1很简单地解决了它。谢谢! – KLL