error: can't copy 'docx\templates\default-docx-template': doesn't exist or not a regular file --------------- Failed building wheel for python-docx; python-docx的安装使用;python操作word
本人第一安装python-docx很不幸就出现了,如下的错误:(如果你也遇到同样的错误,不要慌可以参考下面解决方案,由于第一次处理这种错误,如有不对欢迎大家多多批评指正)

问题所在是因为我们的setuptools版本太低了
解决办法:
1.首先进行升级
pip install -U setuptools

2.切换到扩展库的安装目录执行以下命令 pip install python-docx


3.验证
# ecoding=utf-8
from docx import Document document = Document('D:\\11.docx') #打开文件demo.docx
for paragraph in document.paragraphs:
print(paragraph.text) #打印各段落内容文本 document.add_paragraph(
'Add new paragraph', style='ListNumber'
) #添加新段落 document.save('demo.docx') #保存文档

error: can't copy 'docx\templates\default-docx-template': doesn't exist or not a regular file --------------- Failed building wheel for python-docx; python-docx的安装使用;python操作word的更多相关文章
- error MSB3073: 命令“copy /y
编译VC程序时候报错:error MSB3073: 命令“copy /y 查看: 项目的属性->配置属性->生成事件->后期生成事件->命令行: copy /y "$ ...
- C#中使用Spire.docx操作Word文档
使用docx一段时间之后,一些地方还是不方便,然后就尝试寻找一种更加简便的方法. 之前有尝试过使用Npoi操作word表格,但是太烦人了,随后放弃,然后发现免费版本的spire不错,并且在莫种程度上比 ...
- python-docx操作word文件(*.docx)
目录 基础操作 对象关系 添加样式 中文字体微软雅黑,西文字体Times New Roman 首行缩进 单独设置标题样式 设置超链接 参考文档 基础操作 from docx import Docume ...
- Jenkins 发布平台 MSB4064: The "Retries" parameter is not supported & error MSB4063: The "Copy" task could not be initialized
____________________________________________________________________________________________________ ...
- DocX操作word生成报表
1.DocX简介 1.1 简介 DocX是一个在不需要安装word的情况下对word进行操作的开源轻量级.net组件,是由爱尔兰的一个叫Cathal Coffey的博士生开发出来的.DocX使得操作w ...
- git init error:Malformed value for push.default: simple
git init error:Malformed value for push.default: simple 1.git config --global push.default matching
- 异常:Error resolving template "xxx", template might not exist or might not be accessible...解决办法
在开发环境下正常,但使用jar运行时,报错Error resolving template template might not exist or might not be accessible,意思 ...
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable t
spring与hibernate整合然后出现如下错误: org.springframework.beans.factory.BeanCreationException: Error creating ...
- Oracle重启 error: ora-01034:oracle not available ora-27101:shared memory realm does not exist
error: ora-01034:oracle not available ora-27101:shared memory realm does not exist 苦咖啡 他的博客中一篇文章完美的解 ...
随机推荐
- excel2json
原文链接 在游戏项目中一般都需要由策划制作大量的游戏内容,其中很大一部分是使用Excel表来制作的.于是程序就需要把Excel文件转换成程序方便读取的格式. 之前项目使用的Excel表导入工具都是通过 ...
- 删除Win10资源管理器中的3D对象/音乐/视频文件夹
Win10如何删除资源管理器中的3D对象/音乐/视频等文件夹?使用Win10系统的用户都知道,打开此电脑之后,资源管理上面会显示文档/音乐/视频等7个文件夹,一些用户认为很少使用到它们,想要除之而后快 ...
- SQLAlchemy+Flask-RESTful使用(二)
前言 本来没想到能这么快出二的,谁知道序列化组件写上头了.分享知识真的会上瘾.... 变更记录 # 19.3.18 起笔 # 19.3.18 使用SQLAlchemy排序方法 # 19.3.18 补充 ...
- D - WE POJ - 3273 (二分法)
Farmer John is an astounding accounting wizard and has realized he might run out of money to run the ...
- 【mysql】 快速搞定数据库迁移
工具:navicat for mysql
- 【算法】Bert预训练源码阅读
Bert预训练源码 主要代码 地址:https://github.com/google-research/bert create_pretraning_data.py:原始文件转换为训练数据格式 to ...
- js 利用canvas + flv.js实现视频流 截屏 、本地下载功能实现,兼容火狐,谷歌;canvas截屏跨域问题,无音频视频流加载不显示问题
项目:物联网监控项目----后台视频流管理(前端实现视频截屏功能) 本文就不同视频源分情况展示: 1 本地视频(项目同目录视频)截屏(canvas.getContext("2d).drawI ...
- Jmeter组成结构及运行原理
Jmeter结构主要组成要素包括:测试计划,线程组,采样器以及监听器.对于各部件的作用域关系如下图: Jmeter是纯Java程序,使用JVM,运行采用多线程完成,往往单台负载机由于机器配置有限,支持 ...
- Fisher–Yates shuffle 洗牌算法
Fisher-Yates shuffle 是一种生成有限序列的随机排列的算法--简单地说,该算法可以对序列进行混排.本人能力有限,且懒.不会扒论文去研究该算法在数学上的证明,只能抄袭网上的博客总结一遍 ...
- Javascript数据结构与算法--栈的实现与用法
栈数据结构 栈是一种遵从后进先出(LIFO)原则的有序集合.新添加的或者待删除的元素都保存在栈的同一端,称作栈顶,另一端就叫栈底.在栈里,新元素都靠近栈顶,旧元素都接近栈底. 我们在生活中常能看到栈的 ...