QPromise / EasyTrans

支持谷歌翻译、百度翻译、有道翻译的免费接口,基于Django、PyMuPDF实现了pdf文档英译汉的功能,翻译后的pdf格式基本保持不变,可以下载docx和pdf格式的翻译文档,基本解决复制caj中文论文时的格式问题,简单的满足看论文以及写总结的需求。
540 stars 138 forks source link

python trans_file.py运行后报错,但已经安装了报错内容 #45

Closed 760985933 closed 2 years ago

760985933 commented 2 years ago

你好,我在运行的时候提示报错: C:\Download\EasyTrans>python trans_file.py Traceback (most recent call last): File "C:\Download\EasyTrans\trans_file.py", line 20, in from docx import Document File "C:\Users\yaorao\AppData\Local\Programs\Python\Python310\lib\site-packages\docx__init.py", line 14, in from docx.parts.document import DocumentPart File "C:\Users\yaorao\AppData\Local\Programs\Python\Python310\lib\site-packages\docx\parts\document.py", line 7, in from docx.document import Document File "C:\Users\yaorao\AppData\Local\Programs\Python\Python310\lib\site-packages\docx\document.py", line 10, in from docx.section import Section, Sections File "C:\Users\yaorao\AppData\Local\Programs\Python\Python310\lib\site-packages\docx\section.py", line 7, in from collections import Sequence ImportError: cannot import name 'Sequence' from 'collections' (C:\Users\yaorao\AppData\Local\Programs\Python\Python310\lib\collections\init__.py)

组件已经安装了: C:\Download\EasyTrans>pip install lxml Requirement already satisfied: lxml in c:\users\yaorao\appdata\local\programs\python\python310\lib\site-packages (4.8.0)

C:\Download\EasyTrans>pip install Pillow Requirement already satisfied: Pillow in c:\users\yaorao\appdata\local\programs\python\python310\lib\site-packages (9.1.0)

C:\Download\EasyTrans>pip install PyMuPDF Requirement already satisfied: PyMuPDF in c:\users\yaorao\appdata\local\programs\python\python310\lib\site-packages (1.19.6)

C:\Download\EasyTrans>pip install PyPDF2==1.26.0 Requirement already satisfied: PyPDF2==1.26.0 in c:\users\yaorao\appdata\local\programs\python\python310\lib\site-packages (1.26.0)