python 安裝python-docx模塊(如何本地安裝)


一、概述

使用命令

pip install python-docx

安裝會出現錯誤如下:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl

二、解決方案

2.1  從以下網址直接下載python-docx安裝包

https://pypi.org/project/python-docx/#files

 

 2.2  本地安裝命令

pip install ./downloads/SomeProject-1.0.4.tar.gz

其中  ./downloads/SomeProject-1.0.4.tar.gz表示的是下載的python-docx-0.8.10.tar.gz文件的真實路徑。

例如下載的python-docx-0.8.10.tar.gz文件處於C盤下,則應使用命令:

pip install C:\python-docx-0.8.10.tar.gz

三、note

python-docx-0.8.10 需要 lxml>=2.3.2  ,因此如果 lxml版本不對,還需要升級 lxml版本

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM