“导入错误:无法从部分初始化的模块 'pdf2image' 中导入名称 'convert_from_path'(很可能是由于循环导入)”

Dhu*_*ena 2 image python-3.x pypdf2

使用 pdf2image 模块时出现错误:

from pdf2image import convert_from_path pages = convert_from_path('mypdf', 500) for page in pages: page.save('out.jpg', 'JPEG')

spe*_*uns 5

我正在冒险,猜测你的 python 文件被称为 pdf2image.py。尝试将其命名为其他名称。