本人第一安装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的更多相关文章

  1. error MSB3073: 命令“copy /y

    编译VC程序时候报错:error MSB3073: 命令“copy /y 查看: 项目的属性->配置属性->生成事件->后期生成事件->命令行: copy /y "$ ...

  2. C#中使用Spire.docx操作Word文档

    使用docx一段时间之后,一些地方还是不方便,然后就尝试寻找一种更加简便的方法. 之前有尝试过使用Npoi操作word表格,但是太烦人了,随后放弃,然后发现免费版本的spire不错,并且在莫种程度上比 ...

  3. python-docx操作word文件(*.docx)

    目录 基础操作 对象关系 添加样式 中文字体微软雅黑,西文字体Times New Roman 首行缩进 单独设置标题样式 设置超链接 参考文档 基础操作 from docx import Docume ...

  4. Jenkins 发布平台 MSB4064: The "Retries" parameter is not supported & error MSB4063: The "Copy" task could not be initialized

    ____________________________________________________________________________________________________ ...

  5. DocX操作word生成报表

    1.DocX简介 1.1 简介 DocX是一个在不需要安装word的情况下对word进行操作的开源轻量级.net组件,是由爱尔兰的一个叫Cathal Coffey的博士生开发出来的.DocX使得操作w ...

  6. 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

  7. 异常: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,意思 ...

  8. 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 ...

  9. 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 苦咖啡 他的博客中一篇文章完美的解 ...

随机推荐

  1. 网站robots.txt & sitemap.xml

    1. 如何查看网站的robots.txt 网址/robots.txt, 比如小米  https://www.mi.com/robots.txt sitemap.xml

  2. VS2012发布网站详细步骤问题

    http://blog.csdn.net/mrobama/article/details/43118387

  3. Unity AssetBundle的生成、加载和热更新

    当前使用的是unity2018.2.6版本. 生成AssetBundle 这个版本生成AssetBundle有两种方式,一种是在资源的Inspector面板下边配置AssetBundle名称,然后调用 ...

  4. Centos系统FastDFS搭建与排错

    FastDFS中Tracker server主要是负载均衡和调度,Storage server主要是文件存储. 1.1 系统环境 [root@ centos fastdfs]# cat /etc/re ...

  5. 课堂小练习 设计、定义并实现Complex类

    定义一个负数类Complex使得下面的代码能够工作.(课本P145) #include<iostream> #include<cmath> using namespace st ...

  6. @RunWith注解作用

    @RunWith就是一个运行器 @RunWith(JUnit4.class)就是指用JUnit4来运行 @RunWith(SpringJUnit4ClassRunner.class),让测试运行于Sp ...

  7. 马拉车算法——边界拓展时加限制hdu4513

    #include<bits/stdc++.h> using namespace std; #define maxn 500005 int n,p[maxn],s[maxn],s_new[m ...

  8. [转] 如何设置双网卡同时连接内网外网_bpao_新浪博客

    已剪辑自: http://blog.sina.com.cn/s/blog_5d3e229c0100skwe.html 如何设置双网卡同时连接内网外网 . 通过无线网络连接外网,确保连接成功后开始第二步 ...

  9. Ubuntu 下使用 Nginx 部署 .NET Core 2.0 网站

    前言 本文介绍如何在 Ubuntu 16.04 服务器上安装 .NET Core 2.0 SDK.创建项目与发布,并使用 Nginx 部署 .NET Core 2.0 Web 项目. 安装 .NET ...

  10. css边框动画

    <div class="button">hover me to change</div> .button{ width:200px; height:60px ...