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表导入工具都是通过 ...
- css奇技淫巧-色彩渐变与动态渐变
来源 css渐变 CSS 中设置的渐变是 gradient 数据类型,它是一种特别的image数据类型.使用background-image设置,可叠加设置多个: CSS3 定义了两种类型的渐变(gr ...
- mathJax基础语法-0基础开始,(这是网上抄来的如果有权限和版权问题联系本人处理,仅供学术参考)
- spring-cloud-zuul服务网关
Zuul包含了对请求的路由和过滤两个最主要的功能: 其中路由功能负责将外部请求转发到具体的微服务实例上,是实现外部访问统一入口的基础,类似于保安的职能,而过滤器功能则负责对请求的处理过程进行干预,是实 ...
- selenium截图
文件结构 1.DateUtil.py # cncoding = utf-8 import time from datetime import datetime ''' 本文件主要用于获取当前的日期以及 ...
- spring boot 2.0 配置双数据源 MySQL 和 SqlServer
参考:https://www.cnblogs.com/xiaofengfeng/p/9552816.html 安装 org.mybatis.spring.boot:mybatis-spring-boo ...
- php ReflectionClass类遍历类中包含元素的方法
ReflectionClass 类 类内容 class MyClass { const myconst1 = 100000001; const myconst2 = [ 1 => '开始时间', ...
- lxml爬取实验
1.豆瓣 爬取单个页面数据 import requests from lxml import etree #import os url = "https://movie.douban.com ...
- restful规范简要概述
在 RESTful 架构概念详解 中聊了一些概念和约束, 本篇主要简要的聊一聊 RESTful API 规范概要设计, 内容源自 阮一峰老师的博客 一. 协议(protocol) 服务端的 API 与 ...
- linux系统优化配置
# 2 millions system-wide sysctl -w fs.file-max=2097152 sysctl -w fs.nr_open=2097152 echo 2097152 > ...