许久没更新,安装Python第三方库python-docx都困难系列(统信UOS)

统信UOS安装python-docx遇到的困难

**前言:**本文默认你的国产系统(通信)已经可以使用pip3,貌似pip不可以直接用
如果你pip3不能使用,移步知乎大佬或者直接百度

> https://zhuanlan.zhihu.com/p/443304282

正文
直接安装python-docx出现的问题如下:

  • 1.具体报错忘记保存了,它说要先安装lxml库,然后我就着手呗

出现下面问题:

Collecting lxml
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/84/74/4a97db45381316cd6e7d4b1eb707d7f60d38cb2985b5dfd7251a340404da/lxml-4.7.1.tar.gz
Complete output from command python setup.py egg_info:
Building lxml version 4.7.1.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are installed.
----------------------------------------
Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-q5nyly9f/lxml/

  • 2.Please make sure the libxml2 and libxslt development packages are installed.

所以我就去安装这libxml2 和 libxslt 两个库

  • 3.结果你猜怎么着。诶!!当然是失败啦
    在这里插入图片描述
    具体报错:

Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.tuna.tsinghua.edu.cn/simple/libxml2/

另外一个库也是如此相同的报错,到底是怎么回事呢,这个环境错误???

然后看了很多帖子之后发现可能是要升级pip库了,你说离谱不离谱

1.更新pip

pip3 install --user --upgrade pip

2.安装lxml

pip3 install lxml -i https://pypi.tuna.tsinghua.edu.cn/simple

3.python-docx

pip3 install python-docx -i https://pypi.tuna.tsinghua.edu.cn/simple

4.撒花,终于可以着手识别那些公文标题然后作为文件名称了!!!哈哈哈哈哈哈哈哈哈哈
在这里插入图片描述

  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值