请不要将其标记为重复,因为类似问题的解决方案对我不起作用
我的系统是ubuntu 16.04,我使用的是python 2.7.12
我正在尝试做的是,使用pdftohtml将pdf文件转换为html。似乎我可以用poppler做到这一点。
我已经用sudo apt-get install安装了python-poppler,它似乎已经安装了:
dpkg -s python-poppler
Package: python-poppler
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 144
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 0.12.1-8.1
Provides: python2.7-poppler
Depends: libc6 (>= 2.4), libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.8.0), libpoppler-glib8 (>= 0.18.0), python (>= 2.7), python (<< 2.8), python-gtk2 (>= 2.10.0), python-gobject (>= 2.10.1), python-cairo (>= 1.8.4)
Description: Poppler Python bindings
This package includes Python bindings for LibPoppler.
It is needed to run programs written in Python and using Poppler set.
LibPoppler is a PDF rendering library based on xpdf PDF viewer, and used by
kpdf and evince PDF viewers.
Original-Maintainer: Andrea Gasparini <gaspa@yattaweb.it>
Homepage: http://launchpad.net/poppler-python但是,在导入弹出器时,它会抛出导入错误。这里我漏掉了什么?
发布于 2017-02-01 06:22:27
好吧,问题是我的虚拟环境没有使用任何参数创建-所以--no-site-package被用作默认值。当我使用mkvirtualenv --system-site-package重新创建它时,一切正常。
https://stackoverflow.com/questions/41959478
复制相似问题