一、入门
1、python基础知识 - http://books.howdoit.cn/001-PythonBase/file/1/ 了解python基础知识。
a、 注意教程里面的python版本与错误:raw_inupt是python2.x python3.x使用input。
2、下载PyCharm - https://www.runoob.com/w3cnote/pycharm-windows-install.html python编辑器。
在编辑器中练习python的基础知识后,如果需要想要处理word文件,就需要安装python-docx
安装流程:
a、windonw + R 打开运行窗口,输入cmd ,如下
b、打开命令窗口,输入
#我使用 python3.7.6 自带pip(如果你的版本不自带,请自行下载)
python -m pip install python-docx
得到下图:
安装成功(如果pycharm编辑器在打开状态,记得重启)。
二、使用python-docx处理文档
具体的使用流程:https://python-docx.readthedocs.io/en/latest/user/install.html
三、使用pywin32包处理word
下载pywin32包最简单方便的方式使用pychram安装:
1、打开pycharm, 点击File->settings
安装之后即可使用,简单实践:使用python简单的合并多个word文件
四、使用pip 报错:No module named pip
解决方法:参考地址:https://blog.csdn.net/a1007720052/article/details/81906460
windows 解决方法:python -m ensurepip
升级pip版本:>>> pip install --upgrade pip
linux解决方法:
python -m ensurepip
sudo easy_install pip
有错误请各位大佬指出,谢谢
待续······