你好,我在运行的时候提示报错:
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>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)