这个方法不行 image.png


https://blog.csdn.net/m0_47472749/article/details/109143669
image.png

https://blog.csdn.net/thenorther/article/details/104376561
image.png

image.png
C:\Users\23046\AppData\Local\Programs\Python\Python38\Scripts
我的电脑在这个路径安装

https://blog.csdn.net/qq_19716143/article/details/121353147


最新方法:

  1. pip install openpyxl -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

image.png

  1. //进入python环境
  2. python
  3. import openpyxl
  1. //没有报错就是安装成功
  2. exit()
  3. //再次检查
  4. pip list

pip install python-docx

pip install python-docx -i http://pypi.douban.com/simple —trusted-host pypi.douban.com
Python中 “from docx import Document”报错_三鲜米饭的博客-CSDN博客