Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新安装报错 ImportError: cannot import name 'OxmlElement' from 'docx.oxml.xmlchemy' #84

Closed
rtcatc opened this issue Mar 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rtcatc
Copy link
Owner

rtcatc commented Mar 17, 2024

ImportError: cannot import name 'OxmlElement' from 'docx.oxml.xmlchemy' (/opt/anaconda3/lib/python3.11/site-packages/docx/oxml/xmlchemy.py)

@rtcatc rtcatc added the bug Something isn't working label Mar 17, 2024
@rtcatc
Copy link
Owner Author

rtcatc commented Mar 17, 2024

报错原因 最新版本升级了API
Ref: python-openxml/python-docx#1256 (comment)

解决方法:
pip install python-docx==0.8.11

@rtcatc
Copy link
Owner Author

rtcatc commented Mar 17, 2024

合并Issues:
#81
#78
#79

问题早已修复 更新最新版即可

@rtcatc rtcatc closed this as completed Mar 17, 2024
@rtcatc rtcatc changed the title python3.11新环境pip安装运行报错 python3新环境pip安装运行报错 ImportError: cannot import name 'OxmlElement' from 'docx.oxml.xmlchemy' Mar 17, 2024
@rtcatc rtcatc pinned this issue Mar 17, 2024
@rtcatc rtcatc changed the title python3新环境pip安装运行报错 ImportError: cannot import name 'OxmlElement' from 'docx.oxml.xmlchemy' 新安装报错 ImportError: cannot import name 'OxmlElement' from 'docx.oxml.xmlchemy' Mar 17, 2024
@yizhongbear
Copy link

yizhongbear commented May 14, 2024

现在来看,还是python-docx==0.8.11稳
WX20240514-144357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants